• Robert Haas's avatar
    Prevent "snapshot too old" from trying to return pruned TOAST tuples. · 3e2f3c2e
    Robert Haas authored
    Previously, we tested for MVCC snapshots to see whether they were too
    old, but not TOAST snapshots, which can lead to complaints about missing
    TOAST chunks if those chunks are subject to early pruning.  Ideally,
    the threshold lsn and timestamp for a TOAST snapshot would be that of
    the corresponding MVCC snapshot, but since we have no way of deciding
    which MVCC snapshot was used to fetch the TOAST pointer, use the oldest
    active or registered snapshot instead.
    
    Reported by Andres Freund, who also sketched out what the fix should
    look like.  Patch by me, reviewed by Amit Kapila.
    3e2f3c2e
bufmgr.h 9.36 KB