On Wed, 2009-09-16 at 11:40 -0700, Jeff Davis wrote:
> 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?
I think it would be useful to have an additional option to force VACUUM
to wait for the lock so it can truncate. It's annoying to have to re-run
VACUUM just to give it a chance at the lock again.
-- Simon Riggs www.2ndQuadrant.com