Re: automatic REINDEX-ing - Mailing list pgsql-general

From Kevin Hunter
Subject Re: automatic REINDEX-ing
Date
Msg-id 48A316D3.7070608@earlham.edu
Whole thread Raw
In response to Re: automatic REINDEX-ing  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: automatic REINDEX-ing
Re: automatic REINDEX-ing
List pgsql-general
At 12:53p -0400 on Wed, 13 Aug 2008, Martijn van Oosterhout wrote:
> On Wed, Aug 13, 2008 at 12:41:41PM -0400, Kevin Hunter wrote:
>> Roughly, VACUUM simply reclaims/frees disk space, while VACUUM FULL
>> additionally reorganizes disk usage.  I'm still don't know *why* this
>> leads to index bloat, however, just that it does.  I must defer that
>> explication to a Postgres guru.
>
> Because VACUUM FULL needs to move stuff around in the table which means it
> need to mess around with the indexes (adding new entries). Ordinary
> VACUUM only needs to delete stuff so doesn't cause anywhere near as
> many problems.

Hmm.  I get the reorganization bit, but so what?  Since VACUUM FULL
already has an exclusive lock, what prevents it from updating the
indexes in-place to point to the new physical disk location?  Why does
it need to create extra bloat?

Or, failing that, what's the reason to not issue a REINDEX CONCURRENTLY
automatically after a VACUUM FULL (or something to that effect)?

Kevin

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Column alias in where clause?
Next
From: Jeff Ross
Date:
Subject: Re: Column alias in where clause?