@@ -217,8 +217,8 @@ TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
217
217
commitTsShared -> dataLastCommit .nodeid = nodeid ;
218
218
219
219
/* and move forwards our endpoint, if needed */
220
- if (TransactionIdPrecedes (ShmemVariableCache -> newestCommitTs , newestXact ))
221
- ShmemVariableCache -> newestCommitTs = newestXact ;
220
+ if (TransactionIdPrecedes (ShmemVariableCache -> newestCommitTsXid , newestXact ))
221
+ ShmemVariableCache -> newestCommitTsXid = newestXact ;
222
222
LWLockRelease (CommitTsLock );
223
223
}
224
224
@@ -285,8 +285,8 @@ TransactionIdGetCommitTsData(TransactionId xid, TimestampTz *ts,
285
285
int entryno = TransactionIdToCTsEntry (xid );
286
286
int slotno ;
287
287
CommitTimestampEntry entry ;
288
- TransactionId oldestCommitTs ;
289
- TransactionId newestCommitTs ;
288
+ TransactionId oldestCommitTsXid ;
289
+ TransactionId newestCommitTsXid ;
290
290
291
291
/* error if the given Xid doesn't normally commit */
292
292
if (!TransactionIdIsNormal (xid ))
@@ -314,18 +314,18 @@ TransactionIdGetCommitTsData(TransactionId xid, TimestampTz *ts,
314
314
return * ts != 0 ;
315
315
}
316
316
317
- oldestCommitTs = ShmemVariableCache -> oldestCommitTs ;
318
- newestCommitTs = ShmemVariableCache -> newestCommitTs ;
317
+ oldestCommitTsXid = ShmemVariableCache -> oldestCommitTsXid ;
318
+ newestCommitTsXid = ShmemVariableCache -> newestCommitTsXid ;
319
319
/* neither is invalid, or both are */
320
- Assert (TransactionIdIsValid (oldestCommitTs ) == TransactionIdIsValid (newestCommitTs ));
320
+ Assert (TransactionIdIsValid (oldestCommitTsXid ) == TransactionIdIsValid (newestCommitTsXid ));
321
321
LWLockRelease (CommitTsLock );
322
322
323
323
/*
324
324
* Return empty if the requested value is outside our valid range.
325
325
*/
326
- if (!TransactionIdIsValid (oldestCommitTs ) ||
327
- TransactionIdPrecedes (xid , oldestCommitTs ) ||
328
- TransactionIdPrecedes (newestCommitTs , xid ))
326
+ if (!TransactionIdIsValid (oldestCommitTsXid ) ||
327
+ TransactionIdPrecedes (xid , oldestCommitTsXid ) ||
328
+ TransactionIdPrecedes (newestCommitTsXid , xid ))
329
329
{
330
330
* ts = 0 ;
331
331
if (nodeid )
@@ -655,14 +655,14 @@ ActivateCommitTs(void)
655
655
* enabled again? It doesn't look like it does, because there should be a
656
656
* checkpoint that sets the value to InvalidTransactionId at end of
657
657
* recovery; and so any chance of injecting new transactions without
658
- * CommitTs values would occur after the oldestCommitTs has been set to
658
+ * CommitTs values would occur after the oldestCommitTsXid has been set to
659
659
* Invalid temporarily.
660
660
*/
661
661
LWLockAcquire (CommitTsLock , LW_EXCLUSIVE );
662
- if (ShmemVariableCache -> oldestCommitTs == InvalidTransactionId )
662
+ if (ShmemVariableCache -> oldestCommitTsXid == InvalidTransactionId )
663
663
{
664
- ShmemVariableCache -> oldestCommitTs =
665
- ShmemVariableCache -> newestCommitTs = ReadNewTransactionId ();
664
+ ShmemVariableCache -> oldestCommitTsXid =
665
+ ShmemVariableCache -> newestCommitTsXid = ReadNewTransactionId ();
666
666
}
667
667
LWLockRelease (CommitTsLock );
668
668
@@ -711,8 +711,8 @@ DeactivateCommitTs(void)
711
711
TIMESTAMP_NOBEGIN (commitTsShared -> dataLastCommit .time );
712
712
commitTsShared -> dataLastCommit .nodeid = InvalidRepOriginId ;
713
713
714
- ShmemVariableCache -> oldestCommitTs = InvalidTransactionId ;
715
- ShmemVariableCache -> newestCommitTs = InvalidTransactionId ;
714
+ ShmemVariableCache -> oldestCommitTsXid = InvalidTransactionId ;
715
+ ShmemVariableCache -> newestCommitTsXid = InvalidTransactionId ;
716
716
717
717
LWLockRelease (CommitTsLock );
718
718
@@ -832,16 +832,16 @@ SetCommitTsLimit(TransactionId oldestXact, TransactionId newestXact)
832
832
* "future" or signal a disabled committs.
833
833
*/
834
834
LWLockAcquire (CommitTsLock , LW_EXCLUSIVE );
835
- if (ShmemVariableCache -> oldestCommitTs != InvalidTransactionId )
835
+ if (ShmemVariableCache -> oldestCommitTsXid != InvalidTransactionId )
836
836
{
837
- if (TransactionIdPrecedes (ShmemVariableCache -> oldestCommitTs , oldestXact ))
838
- ShmemVariableCache -> oldestCommitTs = oldestXact ;
839
- if (TransactionIdPrecedes (newestXact , ShmemVariableCache -> newestCommitTs ))
840
- ShmemVariableCache -> newestCommitTs = newestXact ;
837
+ if (TransactionIdPrecedes (ShmemVariableCache -> oldestCommitTsXid , oldestXact ))
838
+ ShmemVariableCache -> oldestCommitTsXid = oldestXact ;
839
+ if (TransactionIdPrecedes (newestXact , ShmemVariableCache -> newestCommitTsXid ))
840
+ ShmemVariableCache -> newestCommitTsXid = newestXact ;
841
841
}
842
842
else
843
843
{
844
- Assert (ShmemVariableCache -> newestCommitTs == InvalidTransactionId );
844
+ Assert (ShmemVariableCache -> newestCommitTsXid == InvalidTransactionId );
845
845
}
846
846
LWLockRelease (CommitTsLock );
847
847
}
@@ -850,12 +850,12 @@ SetCommitTsLimit(TransactionId oldestXact, TransactionId newestXact)
850
850
* Move forwards the oldest commitTS value that can be consulted
851
851
*/
852
852
void
853
- AdvanceOldestCommitTs (TransactionId oldestXact )
853
+ AdvanceOldestCommitTsXid (TransactionId oldestXact )
854
854
{
855
855
LWLockAcquire (CommitTsLock , LW_EXCLUSIVE );
856
- if (ShmemVariableCache -> oldestCommitTs != InvalidTransactionId &&
857
- TransactionIdPrecedes (ShmemVariableCache -> oldestCommitTs , oldestXact ))
858
- ShmemVariableCache -> oldestCommitTs = oldestXact ;
856
+ if (ShmemVariableCache -> oldestCommitTsXid != InvalidTransactionId &&
857
+ TransactionIdPrecedes (ShmemVariableCache -> oldestCommitTsXid , oldestXact ))
858
+ ShmemVariableCache -> oldestCommitTsXid = oldestXact ;
859
859
LWLockRelease (CommitTsLock );
860
860
}
861
861
0 commit comments