diff options
author | Heikki Linnakangas | 2024-12-09 16:13:03 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2024-12-09 16:13:03 +0000 |
commit | 4d8275046c36792afb3604677c0a53c8530388ae (patch) | |
tree | af6d2e812ed839329c9582720ff5adb404936c26 /src/backend/access/heap/heaptoast.c | |
parent | f64ec81a810ebd4649beb6c153844fa9ae1ecffe (diff) |
Remove remants of "snapshot too old"
Remove the 'whenTaken' and 'lsn' fields from SnapshotData. After the
removal of the "snapshot too old" feature, they were never set to a
non-zero value.
This largely reverts commit 3e2f3c2e423, which added the
OldestActiveSnapshot tracking, and the init_toast_snapshot()
function. That was only required for setting the 'whenTaken' and 'lsn'
fields. SnapshotToast is now a constant again, like SnapshotSelf and
SnapshotAny. I kept a thin get_toast_snapshot() wrapper around
SnapshotToast though, to check that you have a registered or active
snapshot. That's still a useful sanity check.
Reviewed-by: Nathan Bossart, Andres Freund, Tom Lane
Discussion: https://www.postgresql.org/message-id/[email protected]
Diffstat (limited to 'src/backend/access/heap/heaptoast.c')
-rw-r--r-- | src/backend/access/heap/heaptoast.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/access/heap/heaptoast.c b/src/backend/access/heap/heaptoast.c index a420e165304..aae72bc2abf 100644 --- a/src/backend/access/heap/heaptoast.c +++ b/src/backend/access/heap/heaptoast.c @@ -639,7 +639,6 @@ heap_fetch_toast_slice(Relation toastrel, Oid valueid, int32 attrsize, int endchunk; int num_indexes; int validIndex; - SnapshotData SnapshotToast; /* Look for the valid index of toast relation */ validIndex = toast_open_indexes(toastrel, @@ -685,9 +684,8 @@ heap_fetch_toast_slice(Relation toastrel, Oid valueid, int32 attrsize, } /* Prepare for scan */ - init_toast_snapshot(&SnapshotToast); toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex], - &SnapshotToast, nscankeys, toastkey); + get_toast_snapshot(), nscankeys, toastkey); /* * Read the chunks by index |