diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-02-15 13:03:10 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-02-15 13:17:02 +1300 |
commit | c7ecd6af010e2ac8c5530f3985e97f24531bfa5f (patch) | |
tree | 8785c054728b84297612a930ee4e344a29f510b8 /src/backend/access | |
parent | 8facf1ea00b7a0c08c755a0392212b83e04ae28a (diff) | |
download | postgresql-c7ecd6af010e2ac8c5530f3985e97f24531bfa5f.tar.gz postgresql-c7ecd6af010e2ac8c5530f3985e97f24531bfa5f.zip |
ReadNewTransactionId() -> ReadNextTransactionId().
The new name conveys the effect better, is more consistent with similar
functions ReadNextMultiXactId(), ReadNextFullTransactionId(), and
matches the name of the variable that it reads.
Reported-by: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-WzmVR4SakBXQUdhhPpMf1aYvZCnna5%3DHKa7DAgEmBAg%2B8g%40mail.gmail.com
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/gin/ginvacuum.c | 2 | ||||
-rw-r--r-- | src/backend/access/nbtree/nbtpage.c | 6 | ||||
-rw-r--r-- | src/backend/access/transam/commit_ts.c | 2 | ||||
-rw-r--r-- | src/backend/access/transam/xact.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c index 35b85a9bff0..a0453b36cde 100644 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@ -189,7 +189,7 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn * address. */ GinPageSetDeleted(page); - GinPageSetDeleteXid(page, ReadNewTransactionId()); + GinPageSetDeleteXid(page, ReadNextTransactionId()); MarkBufferDirty(pBuffer); MarkBufferDirty(lBuffer); diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index ac264a5952d..8c326a4774c 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -2266,7 +2266,7 @@ _bt_mark_page_halfdead(Relation rel, Buffer leafbuf, BTStack stack) * * We maintain *oldestBtpoXact for pages that are deleted by the current * VACUUM operation here. This must be handled here because we conservatively - * assume that there needs to be a new call to ReadNewTransactionId() each + * assume that there needs to be a new call to ReadNextTransactionId() each * time a page gets deleted. See comments about the underlying assumption * below. * @@ -2559,7 +2559,7 @@ _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, BlockNumber scanblkno, * Mark the page itself deleted. It can be recycled when all current * transactions are gone. Storing GetTopTransactionId() would work, but * we're in VACUUM and would not otherwise have an XID. Having already - * updated links to the target, ReadNewTransactionId() suffices as an + * updated links to the target, ReadNextTransactionId() suffices as an * upper bound. Any scan having retained a now-stale link is advertising * in its PGPROC an xmin less than or equal to the value we read here. It * will continue to do so, holding back the xmin horizon, for the duration @@ -2570,7 +2570,7 @@ _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, BlockNumber scanblkno, Assert(P_ISHALFDEAD(opaque) || !P_ISLEAF(opaque)); opaque->btpo_flags &= ~BTP_HALF_DEAD; opaque->btpo_flags |= BTP_DELETED; - opaque->btpo.xact = ReadNewTransactionId(); + opaque->btpo.xact = ReadNextTransactionId(); /* * Remove the remaining tuples on the page. This keeps things simple for diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 9f42461e12c..48e8d662860 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -733,7 +733,7 @@ ActivateCommitTs(void) if (ShmemVariableCache->oldestCommitTsXid == InvalidTransactionId) { ShmemVariableCache->oldestCommitTsXid = - ShmemVariableCache->newestCommitTsXid = ReadNewTransactionId(); + ShmemVariableCache->newestCommitTsXid = ReadNextTransactionId(); } LWLockRelease(CommitTsLock); diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 3c8b4eb3622..17fbc41bbb7 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -548,7 +548,7 @@ GetStableLatestTransactionId(void) lxid = MyProc->lxid; stablexid = GetTopTransactionIdIfAny(); if (!TransactionIdIsValid(stablexid)) - stablexid = ReadNewTransactionId(); + stablexid = ReadNextTransactionId(); } Assert(TransactionIdIsValid(stablexid)); |