Re: [HACKERS] Non-transactional pg_class, try 2

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Non-transactional pg_class, try 2
Date: 2006-06-29 20:37:36
Message-ID: 20060629203736.GB8591@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

> In fact, maybe we should just force an autovac cycle for any DB that
> appears to be approaching wraparound, rather than waiting for the
> shutdown-before-wraparound code to kick in. Getting into that state
> amounts to whacking DBAs upside the head for being stupid, which
> doesn't really win us any friends ...

Sounds fine. How far back should we allow databases to go? If we wait
too long, pg_clog won't be truncated regularly, so I think we should do
it rather early than wait until it's close to wraparound.

> Implementation-wise, I'd propose that we add another PostmasterSignal
> event type whereby a backend could request the postmaster to launch
> an autovac process even if autovac is off. The end-of-VACUUM code that
> scans pg_database.datminxid would issue the signal if it finds anything
> seriously old.

I think we could give autovac a "reason for being started", which would
normally be the periodic stuff, but if the postmaster got the signal
from a backend, pass that info to autovac and it could use a different
database selection algorithm -- say, just select the oldest database,
even if it's not in danger of Xid wraparound. So this would allow early
database-wide vacuums for non-connectable databases (template0), and
normal per-table vacuuming for database that are in actual use.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2006-06-29 20:42:03 Re: Index corruption
Previous Message Jim C. Nasby 2006-06-29 20:22:57 Re: [HACKERS] Some questions to developers

Browse pgsql-patches by date

  From Date Subject
Next Message Jim C. Nasby 2006-06-29 21:37:41 Re: [HACKERS] Non-transactional pg_class, try 2
Previous Message Simon Riggs 2006-06-29 08:39:27 Re: [HACKERS] Non-transactional pg_class, try 2