On 04/11/2018 03:04 PM, Tom Lane wrote: > Chapman Flack <c...@anastigmatix.net> writes: >> that it might *not* be sufficient to find an applicable snapshot at >> the time of constructing the object, and register that snapshot >> on TopTransactionResourceOwner? > > The problem is to know which snapshot is applicable; if the transaction > has more than one, you don't know which was used to read the row of > interest. I suppose you could be conservative and use the oldest one, > if snapmgr lets you find that.
There does seem to be GetOldestSnapshot(), returning older( oldest on active stack, oldest on registered heap ). And it seems to be the very thing called by tuptoaster itself, right after the comment "since we don't know which one to use, just use the oldest one". -Chap