Re: [DOCS] Autovacuum and XID wraparound

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Chris Browne <cbbrowne(at)acm(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [DOCS] Autovacuum and XID wraparound
Date: 2007-05-18 01:05:55
Message-ID: 20070518010555.GY28701@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > The part about actually advancing relfrozenxid is still not done though ...
>
> Right. Are you intending to make that happen?

See attached patch. I'm intending to apply this sometime tomorrow.

Note that affecting CLUSTER changes code used by the ALTER TABLE
rewriting stuff as well; so with this patch, the latter also advances
relfrozenxid. I could have chosen to keep it as it was, but instead I
chose RecentXmin as the new freeze point. This is correct, because when
the table is rewritten, all the tuples are marked the rewriting
transaction's Xid, so for all purposes it behaves like a new table.

Curiously enough, TOAST tables are handled as fallout of other code, so
we don't need to do anything additional for this to work.

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

Attachment Content-Type Size
cluster-relfrozenxid-3.patch text/x-diff 6.0 KB

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2007-05-30 17:41:50 Re: On patching without write access to CVS
Previous Message Alvaro Herrera 2007-05-17 16:17:56 Re: [DOCS] Autovacuum and XID wraparound

Browse pgsql-patches by date

  From Date Subject
Next Message FAST PostgreSQL 2007-05-18 01:47:01 Re: Updateable cursors patch
Previous Message Bruce Momjian 2007-05-18 00:43:25 Re: CREATE TABLE LIKE INCLUDING INDEXES support