On Fri, 2009-01-16 at 22:09 +0200, Heikki Linnakangas wrote:
> >> RecentGlobalXmin is just a hint, it lags behind the real oldest xmin
> >> that GetOldestXmin() would return. If another backend has a more recent
> >> RecentGlobalXmin value, and has killed more recent tuples on the page,
> >> the latestRemovedXid written here is too old.
> >
> > What do you think we should do instead?
>
> Dunno. Maybe call GetOldestXmin().
We are discussing btree deletes, not btree vacuums. If we are doing
btree delete then we have an unreleased snapshot therefore we also have
a non-zero xmin. How can another backend have a later RecentGlobalXmin
or result from GetOldestXmin() than we do?
-- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support