diff options
author | Kevin Grittner <kgrittn@postgresql.org> | 2016-04-25 15:42:29 -0500 |
---|---|---|
committer | Kevin Grittner <kgrittn@postgresql.org> | 2016-04-25 15:42:29 -0500 |
commit | e65953be4f540dce31f17db2934ee58365077272 (patch) | |
tree | 9ab8cf670f36212cbf2f961356e73add906f823c | |
parent | 6b1a213bbd6599228b2b67f7552ff7cc378797bf (diff) | |
download | postgresql-e65953be4f540dce31f17db2934ee58365077272.tar.gz postgresql-e65953be4f540dce31f17db2934ee58365077272.zip |
Fix C comment typo and redundant test
-rw-r--r-- | src/backend/utils/time/snapmgr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 8aa1f49d0fa..35f338133aa 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -1659,7 +1659,7 @@ TransactionIdLimitedForOldSnapshots(TransactionId recentXmin, * This is not an assertion because we avoid the spinlock for * performance, leaving open the possibility that xlimit could advance * and be more current; but it seems prudent to apply this limit. It - * might make pruning a tiny bit less agressive than it could be, but + * might make pruning a tiny bit less aggressive than it could be, but * protects against data loss bugs. */ if (TransactionIdIsNormal(latest_xmin) @@ -1681,9 +1681,8 @@ MaintainOldSnapshotTimeMapping(int64 whenTaken, TransactionId xmin) { int64 ts; - /* Fast exit when old_snapshot_threshold is not used. */ - if (old_snapshot_threshold < 0) - return; + /* Never call this function when old snapshot checking is disabled. */ + Assert(old_snapshot_threshold >= 0); /* Keep track of the latest xmin seen by any process. */ SpinLockAcquire(&oldSnapshotControl->mutex_latest_xmin); |