diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 516a89fa2e..4daa5ae9b0 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -2661,6 +2661,18 @@ SetOffsetVacuumLimit(bool finish_setup) (errmsg("oldest MultiXactId member offset unknown"))); } + /* + * If we failed to get the oldest offset this time, but we have a value + * from a previous pass through this function, assess the need for + * autovacuum based on that old value rather than automatically forcing + * it. + */ + if (prevOldestOffsetKnown && !oldestOffsetKnown) + { + oldestOffset = prevOldestOffset; + oldestOffsetKnown = true; + } + /* * Do we need an emergency autovacuum? If we're not sure, assume yes. */