On Thu, 2 Jan 2025 at 01:12, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
It might be best to just refuse the upgrade if oldestOffsetKnown==false. It's a very ancient corner case. It seems reasonable to require you to upgrade to a newer minor version and run VACUUM before upgrading. IIRC that sets oldestOffsetKnown.
I agree. After all, we do already have a ready-made solution in the form of a vacuum, do we?
If I understand all this multixact_old.c machinery correctly, in case of oldestOffsetKnown==false
we should fail with "could not open file" or offset will be 0 in GetOldMultiXactIdSingleMember.
So, I suppose we can put an analogue of SimpleLruDoesPhysicalPageExist call in the beginning
of GetOldMultiXactIdSingleMember. And if either SimpleLruDoesPhysicalPageExist return false
or a corresponding offset will be 0 we have to bail out with "oldest offset does not exist, consider
running vacuum before pg_upgrdade" or smth. Please, correct me if I'm wrong.