1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Rename VariableCacheData.nextFullXid to nextXid.

Including Full in variable names duplicates the type information and
leads to overly long names. As FullTransactionId cannot accidentally
be casted to TransactionId that does not seem necessary.

Author: Andres Freund
Discussion: https://postgr.es/m/20200724011143.jccsyvsvymuiqfxu@alap3.anarazel.de
This commit is contained in:
Andres Freund
2020-08-11 11:25:23 -07:00
parent 1f75b45413
commit fea10a6434
21 changed files with 96 additions and 96 deletions

View File

@@ -878,10 +878,10 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
LWLockRelease(ProcArrayLock);
/* ShmemVariableCache->nextFullXid must be beyond any observed xid. */
/* ShmemVariableCache->nextXid must be beyond any observed xid. */
AdvanceNextFullTransactionIdPastXid(latestObservedXid);
Assert(FullTransactionIdIsValid(ShmemVariableCache->nextFullXid));
Assert(FullTransactionIdIsValid(ShmemVariableCache->nextXid));
KnownAssignedXidsDisplay(trace_recovery(DEBUG3));
if (standbyState == STANDBY_SNAPSHOT_READY)
@@ -1986,7 +1986,7 @@ GetRunningTransactionData(void)
latestCompletedXid = ShmemVariableCache->latestCompletedXid;
oldestRunningXid = XidFromFullTransactionId(ShmemVariableCache->nextFullXid);
oldestRunningXid = XidFromFullTransactionId(ShmemVariableCache->nextXid);
/*
* Spin over procArray collecting all xids
@@ -2078,7 +2078,7 @@ GetRunningTransactionData(void)
CurrentRunningXacts->xcnt = count - subcount;
CurrentRunningXacts->subxcnt = subcount;
CurrentRunningXacts->subxid_overflow = suboverflowed;
CurrentRunningXacts->nextXid = XidFromFullTransactionId(ShmemVariableCache->nextFullXid);
CurrentRunningXacts->nextXid = XidFromFullTransactionId(ShmemVariableCache->nextXid);
CurrentRunningXacts->oldestRunningXid = oldestRunningXid;
CurrentRunningXacts->latestCompletedXid = latestCompletedXid;
@@ -2123,7 +2123,7 @@ GetOldestActiveTransactionId(void)
* have already completed), when we spin over it.
*/
LWLockAcquire(XidGenLock, LW_SHARED);
oldestRunningXid = XidFromFullTransactionId(ShmemVariableCache->nextFullXid);
oldestRunningXid = XidFromFullTransactionId(ShmemVariableCache->nextXid);
LWLockRelease(XidGenLock);
/*
@@ -2191,7 +2191,7 @@ GetOldestSafeDecodingTransactionId(bool catalogOnly)
* a safe, albeit pessimal, value.
*/
LWLockAcquire(XidGenLock, LW_SHARED);
oldestSafeXid = XidFromFullTransactionId(ShmemVariableCache->nextFullXid);
oldestSafeXid = XidFromFullTransactionId(ShmemVariableCache->nextXid);
/*
* If there's already a slot pegging the xmin horizon, we can start with
@@ -3361,7 +3361,7 @@ RecordKnownAssignedTransactionIds(TransactionId xid)
*/
latestObservedXid = xid;
/* ShmemVariableCache->nextFullXid must be beyond any observed xid */
/* ShmemVariableCache->nextXid must be beyond any observed xid */
AdvanceNextFullTransactionIdPastXid(latestObservedXid);
next_expected_xid = latestObservedXid;
TransactionIdAdvance(next_expected_xid);

View File

@@ -889,7 +889,7 @@ standby_redo(XLogReaderState *record)
* up from a checkpoint and are immediately at our starting point, we
* unconditionally move to STANDBY_INITIALIZED. After this point we
* must do 4 things:
* * move shared nextFullXid forwards as we see new xids
* * move shared nextXid forwards as we see new xids
* * extend the clog and subtrans with each new xid
* * keep track of uncommitted known assigned xids
* * keep track of uncommitted AccessExclusiveLocks