Re: Feedback on getting rid of VACUUM FULL

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feedback on getting rid of VACUUM FULL
Date: 2009-09-17 05:12:09
Message-ID: 4AB1C529.9020806@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Sep 16, 2009 at 9:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>>>> * Shrink a table concurrently - when no dedicated time available
>>> Wishful thinking, which should not stop us from proceeding with the
>>> solutions we know how to implement.
>
>> The UPDATE-style tuple-mover might work for this too, for certain
>> workloads. If most of your transactions are short, and the server
>> load is not too high, it might be OK to lock the table, move a few
>> tuples, lock the table, move a few tuples, etc. Now if you have
>> long-running transactions, not so much.
>
> Yeah, I was just wondering about that myself. Seems like there would
> be lots of situations where short exclusive-lock intervals could be
> tolerated, even though not long ones.

That was my thinking. The tuple moving can block if another backend is
doing updates concurrently, and the moving can block other backends from
updating (and cause serialization errors). But that seems like a
perfectly acceptable limitation that we can simply document. Surely it's
better than taking an ExclusiveLock.

> So that's another argument
> for being able to set an upper bound on how many tuples get moved
> per call.

Yeah, that would alleviate it. We could write a client utility to call
it repeatedly, and perhaps VACUUMs in between, to make it easier to use.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-09-17 05:30:15 Re: Linux LSB init script
Previous Message Tom Lane 2009-09-17 04:50:01 Re: generic copy options