The manual contains:
There are two variants of the VACUUM command. The first form, known as "lazy
vacuum" or just
VACUUM, marks dead data in tables and indexes for future reuse; it does not
attempt to reclaim the
space used by this dead data unless the space is at the end of the table and
an exclusive table lock
can be easily obtained. Unused space at the start or middle of the file does
not result in the file being
shortened and space returned to the operating system. This variant of VACUUM
can be run concurrently
with normal database operations.
The second form is the VACUUM FULL command. This uses a more aggressive
algorithm for reclaiming
the space consumed by dead row versions. Any space that is freed by VACUUM
FULL is immediately
returned to the operating system, and the table data is physically compacted
on the disk.
Unfortunately, this variant of the VACUUM command acquires an exclusive lock
on each table while
VACUUM FULL is processing it. Therefore, frequently using VACUUM FULL can
have an extremely
negative effect on the performance of concurrent database queries.
Does this answer your question?
On Wed, Nov 5, 2008 at 2:47 PM, Marcin Krol <mrkafk(at)gmail(dot)com> wrote:
> Hello everyone,
> I've done VACUUM FULL on my db and noticed that it reclaimed considerably
> more diskspace than regular VACUUM.
> Should I use VACUUM FULL or not? Are there any downsides/risks to it (other
> than that it locks the table while vacuuming)?
> Conversely, are there any performance advantages of db after doing VACUUM
> The docs on VACUUM FULL do not say what it does exactly (in detail)..
> Marcin Krol
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
In response to
pgsql-novice by date
|Next:||From: Tom Lane||Date: 2008-11-05 15:28:12|
|Subject: Re: Does pg_dumpall support BLOBs? |
|Previous:||From: Marcin Krol||Date: 2008-11-05 13:47:47|
|Subject: VACUUM FULL|