Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e65953b

Browse files
committed
Fix C comment typo and redundant test
1 parent 6b1a213 commit e65953b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/utils/time/snapmgr.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ TransactionIdLimitedForOldSnapshots(TransactionId recentXmin,
16591659
* This is not an assertion because we avoid the spinlock for
16601660
* performance, leaving open the possibility that xlimit could advance
16611661
* and be more current; but it seems prudent to apply this limit. It
1662-
* might make pruning a tiny bit less agressive than it could be, but
1662+
* might make pruning a tiny bit less aggressive than it could be, but
16631663
* protects against data loss bugs.
16641664
*/
16651665
if (TransactionIdIsNormal(latest_xmin)
@@ -1681,9 +1681,8 @@ MaintainOldSnapshotTimeMapping(int64 whenTaken, TransactionId xmin)
16811681
{
16821682
int64 ts;
16831683

1684-
/* Fast exit when old_snapshot_threshold is not used. */
1685-
if (old_snapshot_threshold < 0)
1686-
return;
1684+
/* Never call this function when old snapshot checking is disabled. */
1685+
Assert(old_snapshot_threshold >= 0);
16871686

16881687
/* Keep track of the latest xmin seen by any process. */
16891688
SpinLockAcquire(&oldSnapshotControl->mutex_latest_xmin);

0 commit comments

Comments
 (0)