public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Chris Browne <[email protected]>
Cc: [email protected]
Subject: Re: [DOCS] Autovacuum and XID wraparound
Date: Wed, 16 May 2007 14:59:54 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<1179117269.6047.3.camel@goldbach>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Alvaro Herrera wrote:
> However, given that Heikki just confirmed that CLUSTER does not freeze
> tuples, it's not really possible to do this, so I'll drop the CLUSTER
> patch for now.
>
> This means that people using CLUSTER to compact tables won't have the
> benefit of advancing relfrozenxid, so they will have to run VACUUM on
> those tables at some point anyway, even though there will be no dead
> tuples :-(
Now that I think this a bit more, I think CLUSTER should freeze the
tuples. I was worried about losing valuable debug information by doing
that, but thinking a bit more that's not a big concern: we wouldn't
freeze tuples newer than recent xmin. The update chain logic is the most
risky part of the code, and we wouldn't lose the xmin and xmax of tuples
that are part of update chains.
Patch attached. You'll need the changes to cluster.c to set the
relfrozenid as well.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachments:
[text/x-diff] cluster-freeze.patch (716B, 2-cluster-freeze.patch)
download | inline diff:
Index: src/backend/access/heap/rewriteheap.c
===================================================================
RCS file: /home/hlinnaka/pgcvsrepository/pgsql/src/backend/access/heap/rewriteheap.c,v
retrieving revision 1.3
diff -c -r1.3 rewriteheap.c
*** src/backend/access/heap/rewriteheap.c 17 Apr 2007 21:29:31 -0000 1.3
--- src/backend/access/heap/rewriteheap.c 16 May 2007 13:42:23 -0000
***************
*** 538,543 ****
--- 538,545 ----
OffsetNumber newoff;
HeapTuple heaptup;
+ heap_freeze_tuple(tup->t_data, state->rs_oldest_xmin, NULL);
+
/*
* If the new tuple is too big for storage or contains already toasted
* out-of-line attributes from some other relation, invoke the toaster.
view thread (34+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [DOCS] Autovacuum and XID wraparound
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox