Re: database size after a DELETE and VACUUM - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: database size after a DELETE and VACUUM
Date
Msg-id 20050703142337.GA39504@winnie.fuhr.org
Whole thread Raw
In response to database size after a DELETE and VACUUM  (Mike.Samson@apcc.com)
List pgsql-admin
On Fri, Jul 01, 2005 at 09:30:50AM -0400, Mike.Samson@apcc.com wrote:
>
> I would expect the database size to decrease after the VACUUM.

Note what the documentation says about VACUUM and recovering disk
space:

http://www.postgresql.org/docs/8.0/static/maintenance.html#VACUUM-FOR-SPACE-RECOVERY

"There are two variants of the VACUUM command.  The first form,
known as 'lazy vacuum' or just VACUUM, marks expired data in tables
and indexes for future reuse; it does not attempt to reclaim the
space used by this expired data immediately.  Therefore, the table
file is not shortened, and any unused space in the file is not
returned to the operating system.  This variant of VACUUM can be
run concurrently with normal database operations."

"The standard form of VACUUM is best used with the goal of maintaining
a fairly level steady-state usage of disk space.  If you need to
return disk space to the operating system you can use VACUUM FULL --
but what's the point of releasing disk space that will only have
to be allocated again soon?"

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-admin by date:

Previous
From: Mike.Samson@apcc.com
Date:
Subject: database size after a DELETE and VACUUM
Next
From: Christopher Browne
Date:
Subject: Re: database size after a DELETE and VACUUM