aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/snapmgr.h
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2019-07-24 20:24:07 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2019-07-24 20:25:22 +0300
commitfb5344c969af77bb78bc2a643fb75b9f8fea72dd (patch)
treebd4e4af8e04137ff40c32024ea55b53031852b62 /src/include/utils/snapmgr.h
parente2e992c93145cfc0e3563fb84efd25b390a84bb9 (diff)
downloadpostgresql-fb5344c969af77bb78bc2a643fb75b9f8fea72dd.tar.gz
postgresql-fb5344c969af77bb78bc2a643fb75b9f8fea72dd.zip
Use full 64-bit XID for checking if a deleted GiST page is old enough.
Otherwise, after a deleted page gets even older, it becomes unrecyclable again. B-tree has the same problem, and has had since time immemorial, but let's at least fix this in GiST, where this is new. Backpatch to v12, where GiST page deletion was introduced. Reviewed-by: Andrey Borodin Discussion: https://www.postgresql.org/message-id/835A15A5-F1B4-4446-A711-BF48357EB602%40yandex-team.ru
Diffstat (limited to 'src/include/utils/snapmgr.h')
-rw-r--r--src/include/utils/snapmgr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h
index 58ae3b0c7a1..6641ee510a1 100644
--- a/src/include/utils/snapmgr.h
+++ b/src/include/utils/snapmgr.h
@@ -13,6 +13,7 @@
#ifndef SNAPMGR_H
#define SNAPMGR_H
+#include "access/transam.h"
#include "fmgr.h"
#include "utils/relcache.h"
#include "utils/resowner.h"
@@ -122,6 +123,8 @@ extern void UnregisterSnapshot(Snapshot snapshot);
extern Snapshot RegisterSnapshotOnOwner(Snapshot snapshot, ResourceOwner owner);
extern void UnregisterSnapshotFromOwner(Snapshot snapshot, ResourceOwner owner);
+extern FullTransactionId GetFullRecentGlobalXmin(void);
+
extern void AtSubCommit_Snapshot(int level);
extern void AtSubAbort_Snapshot(int level);
extern void AtEOXact_Snapshot(bool isCommit, bool resetXmin);