Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB? - Mailing list pgsql-sql

From Thomas Lockhart
Subject Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?
Date
Msg-id 3A9FA07E.AB3A6DB6@alumni.caltech.edu
Whole thread Raw
In response to why the DB file size does not reduce when 'delete' the data in DB?  ("Jaruwan Laongmal" <jaruwan@gits.net.th>)
List pgsql-sql
> I had deleted a very large number of records out of my SQL table in order to
> decrease the harddisk space.  But after I use command 'ls -l
> /usr/local/pgsql/data/base/', it is found that the size of concerning files
> do not reduce due to the effect of 'delete' SQL command.  What should I do
> if I would like to decrease the harddisk space?

Run "vacuum" from SQL or "vacuumdb" from the command line. Tables will
be reduced in size, though currently indices are not.
                       - Thomas


pgsql-sql by date:

Previous
From: Sondaar Roelof
Date:
Subject: RE: Help creating rules/triggers/functions
Next
From: Peter Eisentraut
Date:
Subject: Re: SQL copy from csv with explicit field ordering