mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
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
This commit is contained in:
@ -1014,7 +1014,7 @@ vacuum_set_xid_limits(Relation rel,
|
||||
* 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;
|
||||
|
||||
@ -1097,7 +1097,7 @@ vacuum_set_xid_limits(Relation rel,
|
||||
* 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;
|
||||
|
||||
@ -1314,7 +1314,7 @@ vac_update_relstats(Relation relation,
|
||||
if (TransactionIdIsNormal(frozenxid) &&
|
||||
pgcform->relfrozenxid != frozenxid &&
|
||||
(TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
|
||||
TransactionIdPrecedes(ReadNewTransactionId(),
|
||||
TransactionIdPrecedes(ReadNextTransactionId(),
|
||||
pgcform->relfrozenxid)))
|
||||
{
|
||||
pgcform->relfrozenxid = frozenxid;
|
||||
@ -1401,7 +1401,7 @@ vac_update_datfrozenxid(void)
|
||||
* 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();
|
||||
|
||||
/*
|
||||
@ -1577,7 +1577,7 @@ vac_truncate_clog(TransactionId frozenXID,
|
||||
TransactionId lastSaneFrozenXid,
|
||||
MultiXactId lastSaneMinMulti)
|
||||
{
|
||||
TransactionId nextXID = ReadNewTransactionId();
|
||||
TransactionId nextXID = ReadNextTransactionId();
|
||||
Relation relation;
|
||||
TableScanDesc scan;
|
||||
HeapTuple tuple;
|
||||
|
Reference in New Issue
Block a user