Re: advantage of new vacuum

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: advantage of new vacuum
Date: 2010-01-07 19:29:47
Message-ID: 1262892587.5908.339.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-01-07 19:34:38 Re: true serializability and predicate locking
Previous Message Joachim Wieland 2010-01-07 19:24:25 Re: Hot Standy introduced problem with query cancel behavior