Re: autovacuum

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: autovacuum
Date: 2006-02-01 19:51:36
Message-ID: 60fyn2luwn.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) writes:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>> Hmm, yeah, sounds useful. There's one implementation issue to notice
>> however, and it's that the autovacuum process dies and restarts for each
>> iteration, so there's no way for it to remember previous state unless
>> it's saved somewhere permanent, as the stats info is.
>
> I think you'd really need to remember the previous oldest XID on a
> per-table basis to get full traction out of the idea. But weren't
> we thinking of tracking something isomorphic to this for purposes of
> minimizing anti-wraparound VACUUMs?

I think I'd like that even better :-).

In the Slony-I case, the tables being vacuumed are ones where the
deletion is taking place within the same thread, so that having one
XID is plenty enough because the only thing that should be touching
the tables is the cleanup thread, which is invoked every 10 minutes.
One XID is enough "protection" for that, as least as a reasonable
approximation.

Tracking just the one eldest XID is still quite likely to be
*reasonably* useful with autovacuum, assuming there isn't a by-table
option. By-table would be better, though.
--
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://www3.sympatico.ca/cbbrowne/sgml.html
"Politics is not a bad profession. If you succeed there are many
rewards, if you disgrace yourself you can always write a book."
-- Ronald Reagan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Browne 2006-02-01 20:50:25 Re: autovacuum
Previous Message Tom Lane 2006-02-01 18:18:31 Re: [HACKERS] autovacuum

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-02-01 20:14:53 Re: A note about testing EXEC_BACKEND on recent Linuxen
Previous Message Tom Lane 2006-02-01 19:50:43 Re: A note about testing EXEC_BACKEND on recent Linuxen