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

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

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-09 08:33:01
Message-ID: 1268123581.10620.76.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On Sun, 2010-01-31 at 16:53 -0500, Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > IIRC it was Greg Stark who suggested last time this was discussed that
> > we could calculate the exact value for latestRemovedXid in the standby.
> > 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.
> 
> This assumes that the standby can tell which heap tuples are being
> removed, which I'm not sure is true --- consider the case where the
> deletion record is carrying a page image instead of a list of deleted
> tuples.  But maybe we could rejigger the representation to make sure
> that the info is always available.  In general it sounds like a much
> nicer answer.

I'm looking at this now since we definitely need either this or the
previous patch.

XLOG_BTREE_DELETE records would not carry latestRemovedXid, this would
be calculated by inspection of heap tuples. XLOG_BTREE_DELETE would have
a heap relid, to allow direct access to the heap without a Relation. We
would check xmin, xmax and xvac. Code will look a little like
heap_fetch() though disimilar enough not to use directly. We would only
look at the tuple header and info.

-- 
 Simon Riggs           www.2ndQuadrant.com


In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-03-09 09:20:48
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Previous:From: Magnus HaganderDate: 2010-03-09 08:00:21
Subject: Re: Visual Studio 2005, C-language function - avoiding hacks?

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-03-09 09:20:48
Subject: Re: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Previous:From: User ItagakiDate: 2010-03-09 07:17:20
Subject: pgstatsinfo - pg_statsinfo: remove unused file.

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