Re: Autovacuum integration patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: Alvaro Herrera <alvherre(at)surnet(dot)cl>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autovacuum integration patch
Date: 2005-07-05 16:16:34
Message-ID: 23560.1120580194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
>>> Hmm. Yes, this patch doesn't handle Xid wraparound. This should be
>>> easy to add though. Anyway, I was thinking that we could add a "last
>>> vacuum Xid" to pg_autovacuum, and handle Xid wraparound for each table
>>> separately -- this means you don't have to issue huge whole-database
>>> VACUUMs, because it will be handled nicely for each table. Storing the
>>> last vacuum Xid in pg_database would have to be rethought.

> The current implementation of XID wraparound requires that the vacuum
> command be run against the entire database, you can not run it on a per
> table basis and have it work. At least that is my understanding,

No, you're wrong. VACUUMing of individual tables is perfectly good
enough as far as XID wrap protection goes, it's just that we chose to
track whether it had been done at the database level. If we tracked it
in, say, a new pg_class column then in principle you could protect
against XID wrap with only table-at-a-time VACUUMs. (I think you'd
still want the pg_database column, but you'd update it to be the minimum
of the per-table values at the completion of any VACUUM.)

At the time this didn't seem particularly worth the complication since
no one would be likely to try to do that manually --- but with
autovacuum handling the work, it starts to sound more realistic.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Matthew T. O'Connor 2005-07-05 16:37:08 Re: Autovacuum integration patch
Previous Message Tom Lane 2005-07-05 15:54:47 Re: [PATCHES] Disable page writes when fsync off, add GUC