aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gistxlog.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:24:07 +0300
commit6655a7299d835dea9e8e0ba69cc5284611b96f29 (patch)
tree3ef87e2ae30a08c0ea9cb3413443624352cdc661 /src/include/access/gistxlog.h
parent9eb5607e69933f0a88b6774d1ba728f27afdbd3d (diff)
downloadpostgresql-6655a7299d835dea9e8e0ba69cc5284611b96f29.tar.gz
postgresql-6655a7299d835dea9e8e0ba69cc5284611b96f29.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/access/gistxlog.h')
-rw-r--r--src/include/access/gistxlog.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/access/gistxlog.h b/src/include/access/gistxlog.h
index 969a5376b5e..e44922d915c 100644
--- a/src/include/access/gistxlog.h
+++ b/src/include/access/gistxlog.h
@@ -83,7 +83,7 @@ typedef struct gistxlogPageSplit
*/
typedef struct gistxlogPageDelete
{
- TransactionId deleteXid; /* last Xid which could see page in scan */
+ FullTransactionId deleteXid; /* last Xid which could see page in scan */
OffsetNumber downlinkOffset; /* Offset of downlink referencing this
* page */
} gistxlogPageDelete;
@@ -98,10 +98,10 @@ typedef struct gistxlogPageReuse
{
RelFileNode node;
BlockNumber block;
- TransactionId latestRemovedXid;
+ FullTransactionId latestRemovedFullXid;
} gistxlogPageReuse;
-#define SizeOfGistxlogPageReuse (offsetof(gistxlogPageReuse, latestRemovedXid) + sizeof(TransactionId))
+#define SizeOfGistxlogPageReuse (offsetof(gistxlogPageReuse, latestRemovedFullXid) + sizeof(FullTransactionId))
extern void gist_redo(XLogReaderState *record);
extern void gist_desc(StringInfo buf, XLogReaderState *record);