Re: lazy detoasting - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: lazy detoasting
Date
Msg-id 8ca78589-734b-f904-1cc5-007eeb5d4737@anastigmatix.net
Whole thread Raw
In response to Re: lazy detoasting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 04/11/2018 03:04 PM, Tom Lane wrote:
> Chapman Flack <chap@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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: lazy detoasting
Next
From: Teodor Sigaev
Date:
Subject: Re: Partitioned tables and covering indexes