Re: HOT patch - version 15 - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: HOT patch - version 15
Date
Msg-id 2e78013d0709110511n4dc6409bk1edf9e4cf82bcde2@mail.gmail.com
Whole thread Raw
In response to Re: HOT patch - version 15  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches


On 9/11/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> Pruning removes intermediate dead tuples by marking their line pointers
> ~LP_USED and redirecting the root line pointer to the first
> live/recently_dead tuple in the chain.

It seems utterly unsafe to do this without a vacuum-grade lock on the
page.  Someone might be examining the root tuple (eg, in a SnapshotAny
scan) and I think they are entitled to assume that the line pointer
stays valid while they are looking at the tuple.


As the patch stands, we prune holding a vacuum-grade lock. But ISTM
that there are only limited users of SnapshotAny and we make them
recheck the line pointer after acquiring the buffer lock. So hopefully we
should be fine.

Anyways, its not a concern right now because we hold vacuum-grade lock while
pruning. But if we decide to what Heikki/Greg suggested about quick
pruning then we will have to make sure that your concern is addressed.


Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: WIP patch for latestCompletedXid method of computing snapshot xmax
Next
From: "Pavan Deolasee"
Date:
Subject: Re: HOT patch - version 15