Thread: advantage of new vacuum

advantage of new vacuum

From
Pavel Stehule
Date:
Hello

can somebody explain advantages of new vacuum?

Thank you

Pavel Stehule


Re: advantage of new vacuum

From
Jeff Davis
Date:
On Thu, 2010-01-07 at 13:37 +0100, Pavel Stehule wrote:
> Hello
> 
> can somebody explain advantages of new vacuum?

VACUUM FULL on a user table now causes a rewrite of the table and index,
which compacts the storage (eliminates table and index bloat). This is
like using CLUSTER, except it doesn't require you to specify an index
(easier to use, and useful when no index exists).

Previously, VACUUM FULL on a user table would attempt to compact the
table storage in-place, but in the process would create additional index
entries (potentially causing index bloat). This worked OK for small
amounts of wasted space, but when there was a lot of wasted space it
would be very slow and expensive. Usually, people don't care about small
amounts of bloat, because the space will most likely be reused soon
anyway; so the previous behavior was rarely useful.

VACUUM FULL on catalogs still uses the old behavior. VACUUM FULL INPLACE
forces the old behavior on user tables, as well.

Regards,Jeff Davis