Re: Eliminating VACUUM FULL WAS: remove flatfiles.c

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, daveg(at)sonic(dot)net, Andrew Dunstan <andrew(at)dunslane(dot)net>, Greg Stark <gsstark(at)mit(dot)edu>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Date: 2009-09-04 18:53:04
Message-ID: 603c8f070909041153m5aef37detdc4f384a2967ced9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 4, 2009 at 2:48 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>>>> I have a client who uses temp tables heavily, hundreds of thousands of
>>>> creates
>>>> and drops per day. They also have long running queries. The only
>>>> thing that
>>>> keeps catalog bloat somewhat in check is vacuum full on bloated catalogs
>>>> a few times a day. With
>
>> Actually, this is a good point ... if we dropped VACUUM FULL, we'd need
>> to also be able to call CLUSTER (or VACUUM REWRITE) on the system catalogs.
>
> I don't think I believe the claim above that vacuum full is actually
> necessary.  Reasonably aggressive regular vacuuming ought to do it.
>
> We used to have a bug that caused row deletions during backend shutdown
> to not get reported to the stats collector; which had the effect that
> dead catalog entries for temp tables didn't get counted, and so autovac
> didn't hit the catalogs often enough, and so you'd get bloat in exactly
> this scenario.  I suspect the claim that manual vacuum full is necessary
> is based on obsolete experience from before that bug got stomped.
> It's hardly an ideal solution anyway given what an exclusive lock on
> pg_class will do to the rest of the system --- and a cluster-like
> cleanup won't be any better about that.

I'm confused. Are you saying that pg_class will never get bloated, so
we don't need a way to debloat it? I realize that with HOT bloat is
much less of a problem than it used to be, but surely it's not
altogether impossible...

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2009-09-04 19:01:27 Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Previous Message Tom Lane 2009-09-04 18:48:42 Re: Eliminating VACUUM FULL WAS: remove flatfiles.c