Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Jaruwan Laongmal <jaruwan(at)gits(dot)net(dot)th>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?
Date: 2001-03-02 15:03:05
Message-ID: 3A9FB629.4080601@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Jaruwan Laongmal wrote:

> 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 the command VACUUM;

This will do the actual removal of deleted records. DELETE just marks
them as deleted

> I am looking forward to your response. Thank you very much for any help.
> -
> Jaruwan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-02 15:37:51 WAL & RC1 status
Previous Message Thomas Lockhart 2001-03-02 13:30:38 Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2001-03-02 15:34:02 Re: Help creating rules/triggers/functions
Previous Message Salvador Mainé 2001-03-02 14:57:11 Re: dates in functions