WIP patch for tuple freezing issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-patches(at)postgreSQL(dot)org
Subject: WIP patch for tuple freezing issues
Date: 2006-11-04 23:06:54
Message-ID: 8028.1162681614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Attached is a draft patch for the WAL-and-freezing issues we've been
discussing. This incorporates Heikki and Simon's work on providing
WAL-logging for tuple freezing actions and pg_clog truncation
respectively, and adds on several other things:

* replace logic for when to truncate pg_clog, as discussed: it's now
driven off the system-wide minimum relfrozenxid.

* add GUC variables and pg_autovacuum support to control the freeze
distance (how far back a VACUUM sets its freeze cutoff, which becomes
the table's new relfrozenxid) as well as the freeze limit (the age of
relfrozenxid at which we force an autovacuum cycle).

* revise the autovacuum logic to exploit the per-table tracking of
relfrozenxid better: there is no concept of a "database wide autovacuum"
anymore, rather we make table-by-table decisions about what needs to
be vacuumed.

* revise the mechanism for forcing autovacs when the freeze limit is
exceeded --- this was previously checked only on completion of a VACUUM,
which seems a bit untrustworthy (if you're not vacuuming, it won't
help). I moved the functionality to varsup.c instead, where we already
had the forced-shutdown-before-wraparound code.

The patch is not ready to apply because it needs more testing (anyone
want to help?) and because I need to do more documentation work;
maintenance.sgml and the vacuum ref page both need some TLC.

Comments?

regards, tom lane

Attachment Content-Type Size
wal-freezing.patch.gz application/octet-stream 38.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2006-11-05 00:43:37 ldap: fix resource leak
Previous Message Tom Lane 2006-11-04 19:04:26 Re: CLUSTER micro-doc-patch