mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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 3e2f3c2e42
, 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/cd4b4f8c-e63a-41c0-95f6-6e6cd9b83f6d@iki.fi
This commit is contained in:
@ -1767,7 +1767,6 @@ check_tuple_attribute(HeapCheckContext *ctx)
|
||||
static void
|
||||
check_toasted_attribute(HeapCheckContext *ctx, ToastedAttribute *ta)
|
||||
{
|
||||
SnapshotData SnapshotToast;
|
||||
ScanKeyData toastkey;
|
||||
SysScanDesc toastscan;
|
||||
bool found_toasttup;
|
||||
@ -1791,10 +1790,9 @@ check_toasted_attribute(HeapCheckContext *ctx, ToastedAttribute *ta)
|
||||
* Check if any chunks for this toasted object exist in the toast table,
|
||||
* accessible via the index.
|
||||
*/
|
||||
init_toast_snapshot(&SnapshotToast);
|
||||
toastscan = systable_beginscan_ordered(ctx->toast_rel,
|
||||
ctx->valid_toast_index,
|
||||
&SnapshotToast, 1,
|
||||
get_toast_snapshot(), 1,
|
||||
&toastkey);
|
||||
found_toasttup = false;
|
||||
while ((toasttup =
|
||||
|
Reference in New Issue
Block a user