aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/multixact.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index b66a2b60c8b..d2619bd8fd0 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2552,6 +2552,7 @@ SetOffsetVacuumLimit(void)
bool oldestOffsetKnown = false;
bool prevOldestOffsetKnown;
MultiXactOffset offsetStopLimit = 0;
+ MultiXactOffset prevOffsetStopLimit;
/*
* NB: Have to prevent concurrent truncation, we might otherwise try to
@@ -2566,6 +2567,7 @@ SetOffsetVacuumLimit(void)
nextOffset = MultiXactState->nextOffset;
prevOldestOffsetKnown = MultiXactState->oldestOffsetKnown;
prevOldestOffset = MultiXactState->oldestOffset;
+ prevOffsetStopLimit = MultiXactState->offsetStopLimit;
Assert(MultiXactState->finishedStartup);
LWLockRelease(MultiXactGenLock);
@@ -2633,11 +2635,13 @@ SetOffsetVacuumLimit(void)
{
/*
* If we failed to get the oldest offset this time, but we have a
- * value from a previous pass through this function, use the old value
- * rather than automatically forcing it.
+ * value from a previous pass through this function, use the old
+ * values rather than automatically forcing an emergency autovacuum
+ * cycle again.
*/
oldestOffset = prevOldestOffset;
oldestOffsetKnown = true;
+ offsetStopLimit = prevOffsetStopLimit;
}
/* Install the computed values */