Skip site navigation (1) Skip section navigation (2)

Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Date: 2010-03-26 20:16:21
Message-ID: 19877.1269634581@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On Sun, 2010-01-31 at 23:43 +0200, Heikki Linnakangas wrote:
>> When replaying the deletion record, the standby could look at all the
>> heap tuples whose index pointers are being removed, to see which one
>> was newest.

> Long after coding this, I now realise this really is a dumb-ass idea.

> There is no spoon. The index tuples did once point at valid heap tuples.
> 1. heap tuples are deleted
> 2. heap tuples become dead
> 3. index tuples can now be marked killed
> 4. index tuples removed
> Heap tuples can be removed at step 2, index tuples can't be removed
> until step 4.

Uh, no, heap tuples can't be removed until after all index entries that
are pointing at them have been removed.  Please tell me you have not
broken this.

> So, barring huge injections of insight, I'll be putting back the
> generation of OldestXmin() into the btree delete path.

I stand by my previous comments about where this is going to end up.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Gokulakannan SomasundaramDate: 2010-03-26 20:53:21
Subject: Performance improvement for unique checks
Previous:From: Simon RiggsDate: 2010-03-26 20:00:00
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-03-27 10:10:42
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Previous:From: Simon RiggsDate: 2010-03-26 20:00:00
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group