Re: POC: make mxidoff 64 bits - Mailing list pgsql-hackers

From Maxim Orlov
Subject Re: POC: make mxidoff 64 bits
Date
Msg-id CACG=ezZwdvsijzuXE3hex3xHcoz75EQYBXRTsQJVwbo5J5sS3g@mail.gmail.com
Whole thread Raw
In response to Re: POC: make mxidoff 64 bits  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers


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.

--
Best regards,
Maxim Orlov.

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: A few patches to clarify snapshot management
Next
From: Amit Kapila
Date:
Subject: Re: Conflict detection for update_deleted in logical replication