Hi,
Currently, if you hold a multixact open long enough to generate an
"oldest multixact is far in the past" message during VACUUM, you may
see the following ERROR:
WARNING: oldest multixact is far in the past
HINT: Close open transactions with multixacts soon to avoid wraparound problems.
ERROR: multixact X from before cutoff Y found to be still running
Upon further inspection, I found that this is because the multixact
limit used in this case is the threshold for which we emit the "oldest
multixact" message. Instead, I think the multixact limit should be
set to the result of GetOldestMultiXactId(), effectively forcing a
minimum freeze age of zero. The ERROR itself is emitted by
FreezeMultiXactId() and appears to be a safeguard against problems
like this.
I've attached a patch to set the limit to the oldest multixact instead
of the "safeMxactLimit" in this case. I'd like to credit Jeremy
Schneider as the original reporter.
Nathan