On 9/11/07, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Pavan Deolasee" <[EMAIL PROTECTED]> 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.