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

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Date: 2010-03-28 08:52:44
Message-ID: 1269766364.3684.2139.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sat, 2010-03-27 at 22:39 +0000, Greg Stark wrote:
> On Sat, Mar 27, 2010 at 7:36 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On Sat, 2010-03-27 at 19:15 +0000, Greg Stark wrote:
> > > If we're pruning an index entry to a heap tuple that has been HOT
> > > pruned wouldn't the HOT pruning record have already conflicted with
> > > any queries that could see it?
> >
> > Quite probably, but a query that started after that record arrived might
> > slip through. We have to treat each WAL record separately.
>
> Slip through? I'm not following you.

No, there is no possibility for it to slip through, you're right. (After
much thinking).

> > Do you agree with the conjecture? That LP_DEAD items can be ignored
> > because their xid would have been earlier than the latest LP_NORMAL
> > tuple we find? (on any page).
> >
> > Or is a slightly less strong condition true: we can ignore LP_DEAD items
> > on a page that is also referenced by an LP_NORMAL item.
>
> I don't like having dependencies on the precise logic in vacuum rather
> than only on the guarantees that vacuum provides. We want to improve
> the logic in vacuum and hot pruning to cover more cases and that will
> be harder if there's code elsewhere depending on its simple-minded xid
> <= globalxmin test.

Agreed

--
Simon Riggs www.2ndQuadrant.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2010-03-28 09:27:02 pgsql: Derive latestRemovedXid for btree deletes by reading heap pages.
Previous Message Greg Stark 2010-03-27 22:39:45 Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-03-28 11:16:09 Re: join removal
Previous Message Pavel Stehule 2010-03-28 05:42:03 Re: plpgsql's case bug?