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/include/access | |
| 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/cd4b4f8c-e63a-41c0-95f6-6e6cd9b83f6d@iki.fi
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/genam.h | 2 | ||||
| -rw-r--r-- | src/include/access/toast_internals.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h index c25f5d11b53..81653febc18 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -14,9 +14,11 @@ #ifndef GENAM_H #define GENAM_H +#include "access/htup.h" #include "access/sdir.h" #include "access/skey.h" #include "nodes/tidbitmap.h" +#include "storage/buf.h" #include "storage/lockdefs.h" #include "utils/relcache.h" #include "utils/snapshot.h" diff --git a/src/include/access/toast_internals.h b/src/include/access/toast_internals.h index 0eeefe59fec..31a7e13c400 100644 --- a/src/include/access/toast_internals.h +++ b/src/include/access/toast_internals.h @@ -58,6 +58,6 @@ extern int toast_open_indexes(Relation toastrel, int *num_indexes); extern void toast_close_indexes(Relation *toastidxs, int num_indexes, LOCKMODE lock); -extern void init_toast_snapshot(Snapshot toast_snapshot); +extern Snapshot get_toast_snapshot(void); #endif /* TOAST_INTERNALS_H */ |
