aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r--src/backend/access/gist/gist.c6
-rw-r--r--src/backend/access/gist/gistxlog.c17
2 files changed, 12 insertions, 11 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 30069f139c7..3e275e67008 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -1665,10 +1665,10 @@ gistprunepage(Relation rel, Page page, Buffer buffer, Relation heapRel)
if (ndeletable > 0)
{
- TransactionId latestRemovedXid = InvalidTransactionId;
+ TransactionId snapshotConflictHorizon = InvalidTransactionId;
if (XLogStandbyInfoActive() && RelationNeedsWAL(rel))
- latestRemovedXid =
+ snapshotConflictHorizon =
index_compute_xid_horizon_for_tuples(rel, heapRel, buffer,
deletable, ndeletable);
@@ -1694,7 +1694,7 @@ gistprunepage(Relation rel, Page page, Buffer buffer, Relation heapRel)
recptr = gistXLogDelete(buffer,
deletable, ndeletable,
- latestRemovedXid);
+ snapshotConflictHorizon);
PageSetLSN(page, recptr);
}
diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c
index 998befd2cbb..cb5affa3d27 100644
--- a/src/backend/access/gist/gistxlog.c
+++ b/src/backend/access/gist/gistxlog.c
@@ -195,7 +195,7 @@ gistRedoDeleteRecord(XLogReaderState *record)
XLogRecGetBlockTag(record, 0, &rlocator, NULL, NULL);
- ResolveRecoveryConflictWithSnapshot(xldata->latestRemovedXid,
+ ResolveRecoveryConflictWithSnapshot(xldata->snapshotConflictHorizon,
rlocator);
}
@@ -388,14 +388,14 @@ gistRedoPageReuse(XLogReaderState *record)
* PAGE_REUSE records exist to provide a conflict point when we reuse
* pages in the index via the FSM. That's all they do though.
*
- * latestRemovedXid was the page's deleteXid. The
+ * snapshotConflictHorizon was the page's deleteXid. The
* GlobalVisCheckRemovableFullXid(deleteXid) test in gistPageRecyclable()
* conceptually mirrors the PGPROC->xmin > limitXmin test in
* GetConflictingVirtualXIDs(). Consequently, one XID value achieves the
* same exclusion effect on primary and standby.
*/
if (InHotStandby)
- ResolveRecoveryConflictWithSnapshotFullXid(xlrec->latestRemovedFullXid,
+ ResolveRecoveryConflictWithSnapshotFullXid(xlrec->snapshotConflictHorizon,
xlrec->locator);
}
@@ -597,7 +597,7 @@ gistXLogAssignLSN(void)
* Write XLOG record about reuse of a deleted page.
*/
void
-gistXLogPageReuse(Relation rel, BlockNumber blkno, FullTransactionId latestRemovedXid)
+gistXLogPageReuse(Relation rel, BlockNumber blkno, FullTransactionId deleteXid)
{
gistxlogPageReuse xlrec_reuse;
@@ -610,7 +610,7 @@ gistXLogPageReuse(Relation rel, BlockNumber blkno, FullTransactionId latestRemov
/* XLOG stuff */
xlrec_reuse.locator = rel->rd_locator;
xlrec_reuse.block = blkno;
- xlrec_reuse.latestRemovedFullXid = latestRemovedXid;
+ xlrec_reuse.snapshotConflictHorizon = deleteXid;
XLogBeginInsert();
XLogRegisterData((char *) &xlrec_reuse, SizeOfGistxlogPageReuse);
@@ -672,12 +672,12 @@ gistXLogUpdate(Buffer buffer,
*/
XLogRecPtr
gistXLogDelete(Buffer buffer, OffsetNumber *todelete, int ntodelete,
- TransactionId latestRemovedXid)
+ TransactionId snapshotConflictHorizon)
{
gistxlogDelete xlrec;
XLogRecPtr recptr;
- xlrec.latestRemovedXid = latestRemovedXid;
+ xlrec.snapshotConflictHorizon = snapshotConflictHorizon;
xlrec.ntodelete = ntodelete;
XLogBeginInsert();
@@ -685,7 +685,8 @@ gistXLogDelete(Buffer buffer, OffsetNumber *todelete, int ntodelete,
/*
* We need the target-offsets array whether or not we store the whole
- * buffer, to allow us to find the latestRemovedXid on a standby server.
+ * buffer, to allow us to find the snapshotConflictHorizon on a standby
+ * server.
*/
XLogRegisterData((char *) todelete, ntodelete * sizeof(OffsetNumber));