Re: Feedback on getting rid of VACUUM FULL - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Feedback on getting rid of VACUUM FULL
Date
Msg-id 1253126450.29243.287.camel@monkey-cat.sm.truviso.com
Whole thread Raw
In response to Re: Feedback on getting rid of VACUUM FULL  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Feedback on getting rid of VACUUM FULL
List pgsql-hackers
On Wed, 2009-09-16 at 21:23 +0300, Heikki Linnakangas wrote:
> 2) Another utility that does something like UPDATE ... WHERE ctid > ? to
> move tuples to lower pages. It will be different from current VACUUM
> FULL in some ways. It won't require a table lock, for example, but it
> won't be able to move update chains as nicely. But it would be trivial
> to write one, so I think we should offer that as a contrib module.

An advantage here is that it would allow people to do a "partial vacuum
full" to gradually move tuples from the end of the relation to the
beginning. That would allow vacuums in between the updates to free the
index tuples, preventing index bloat.

Another thing to think about is that lazy vacuum only shrinks the heap
file if it happens to be able to acquire an access exclusive lock.
Because vacuum can't be run inside a transaction block, I don't think
there's currently a way to ensure that the heap file actually gets
shrunk. How about we provide some way to make it acquire an access
exclusive lock at the beginning, but still perform a lazy vacuum?

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: PATCH: make plpgsql IN args mutable (v1) [REVIEW]
Next
From: Josh Berkus
Date:
Subject: Re: Feedback on getting rid of VACUUM FULL