diff options
Diffstat (limited to 'src/backend/access/index/genam.c')
-rw-r--r-- | src/backend/access/index/genam.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c index 98af5347b9f..01d08960b48 100644 --- a/src/backend/access/index/genam.c +++ b/src/backend/access/index/genam.c @@ -275,14 +275,15 @@ BuildIndexValueDescription(Relation indexRelation, } /* - * Get the latestRemovedXid from the table entries pointed at by the index - * tuples being deleted using an AM-generic approach. + * Get the snapshotConflictHorizon from the table entries pointed to by the + * index tuples being deleted using an AM-generic approach. * - * This is a table_index_delete_tuples() shim used by index AMs that have - * simple requirements. These callers only need to consult the tableam to get - * a latestRemovedXid value, and only expect to delete tuples that are already - * known deletable. When a latestRemovedXid value isn't needed in index AM's - * deletion WAL record, it is safe for it to skip calling here entirely. + * This is a table_index_delete_tuples() shim used by index AMs that only need + * to consult the tableam to get a snapshotConflictHorizon value, and only + * expect to delete index tuples that are already known deletable (typically + * due to having LP_DEAD bits set). When a snapshotConflictHorizon value + * isn't needed in index AM's deletion WAL record, it is safe for it to skip + * calling here entirely. * * We assume that caller index AM uses the standard IndexTuple representation, * with table TIDs stored in the t_tid field. We also expect (and assert) @@ -297,7 +298,7 @@ index_compute_xid_horizon_for_tuples(Relation irel, int nitems) { TM_IndexDeleteOp delstate; - TransactionId latestRemovedXid = InvalidTransactionId; + TransactionId snapshotConflictHorizon = InvalidTransactionId; Page ipage = BufferGetPage(ibuf); IndexTuple itup; @@ -333,7 +334,7 @@ index_compute_xid_horizon_for_tuples(Relation irel, } /* determine the actual xid horizon */ - latestRemovedXid = table_index_delete_tuples(hrel, &delstate); + snapshotConflictHorizon = table_index_delete_tuples(hrel, &delstate); /* assert tableam agrees that all items are deletable */ Assert(delstate.ndeltids == nitems); @@ -341,7 +342,7 @@ index_compute_xid_horizon_for_tuples(Relation irel, pfree(delstate.deltids); pfree(delstate.status); - return latestRemovedXid; + return snapshotConflictHorizon; } |