* address.
*/
GinPageSetDeleted(page);
- GinPageSetDeleteXid(page, ReadNewTransactionId());
+ GinPageSetDeleteXid(page, ReadNextTransactionId());
MarkBufferDirty(pBuffer);
MarkBufferDirty(lBuffer);
*
* 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.
*
* 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
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
if (ShmemVariableCache->oldestCommitTsXid == InvalidTransactionId)
{
ShmemVariableCache->oldestCommitTsXid =
- ShmemVariableCache->newestCommitTsXid = ReadNewTransactionId();
+ ShmemVariableCache->newestCommitTsXid = ReadNextTransactionId();
}
LWLockRelease(CommitTsLock);
lxid = MyProc->lxid;
stablexid = GetTopTransactionIdIfAny();
if (!TransactionIdIsValid(stablexid))
- stablexid = ReadNewTransactionId();
+ stablexid = ReadNextTransactionId();
}
Assert(TransactionIdIsValid(stablexid));
* autovacuum_freeze_max_age / 2 XIDs old), complain and force a minimum
* freeze age of zero.
*/
- safeLimit = ReadNewTransactionId() - autovacuum_freeze_max_age;
+ safeLimit = ReadNextTransactionId() - autovacuum_freeze_max_age;
if (!TransactionIdIsNormal(safeLimit))
safeLimit = FirstNormalTransactionId;
* Compute XID limit causing a full-table vacuum, being careful not to
* generate a "permanent" XID.
*/
- limit = ReadNewTransactionId() - freezetable;
+ limit = ReadNextTransactionId() - freezetable;
if (!TransactionIdIsNormal(limit))
limit = FirstNormalTransactionId;
if (TransactionIdIsNormal(frozenxid) &&
pgcform->relfrozenxid != frozenxid &&
(TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
- TransactionIdPrecedes(ReadNewTransactionId(),
+ TransactionIdPrecedes(ReadNextTransactionId(),
pgcform->relfrozenxid)))
{
pgcform->relfrozenxid = frozenxid;
* validly see during the scan. These are conservative values, but it's
* not really worth trying to be more exact.
*/
- lastSaneFrozenXid = ReadNewTransactionId();
+ lastSaneFrozenXid = ReadNextTransactionId();
lastSaneMinMulti = ReadNextMultiXactId();
/*
TransactionId lastSaneFrozenXid,
MultiXactId lastSaneMinMulti)
{
- TransactionId nextXID = ReadNewTransactionId();
+ TransactionId nextXID = ReadNextTransactionId();
Relation relation;
TableScanDesc scan;
HeapTuple tuple;
* pass without forcing a vacuum. (This limit can be tightened for
* particular tables, but not loosened.)
*/
- recentXid = ReadNewTransactionId();
+ recentXid = ReadNextTransactionId();
xidForceLimit = recentXid - autovacuum_freeze_max_age;
/* ensure it's a "normal" XID, else TransactionIdPrecedes misbehaves */
/* this can cause the limit to go backwards by 3, but that's OK */
pg_usleep(PostAuthDelay * 1000000L);
/* And do an appropriate amount of work */
- recentXid = ReadNewTransactionId();
+ recentXid = ReadNextTransactionId();
recentMulti = ReadNextMultiXactId();
do_autovacuum();
}
* For callers that just need the XID part of the next transaction ID.
*/
static inline TransactionId
-ReadNewTransactionId(void)
+ReadNextTransactionId(void)
{
return XidFromFullTransactionId(ReadNextFullTransactionId());
}