On 07/03/2023 13:38, Maxim Orlov wrote:
> As for making pg_multixact 64 bit, I spend the last couple of days to
> make proper pg_upgrade for pg_multixact's and for pg_xact's
> with wraparound and I've understood, that it is not a simple task
> compare to pg_xact's. The problem is, we do not have epoch for
> multixacts, so we do not have ability to "overcome" wraparound. The
> solution may be adding some kind of epoch for multixacts or
> make them 64 bit in "main" 64-xid patch, but in perspective of this
> thread, in my view, this should be last in line here.
That is true for pg_multixact/offsets. We will indeed need to add an
epoch and introduce the concept of FullMultiXactIds for that. However,
we can change pg_multixact/members independently of that. We can extend
MultiXactOffset from 32 to 64 bits, and eliminate pg_multixact/members
wraparound, while keeping multi-xids 32 bits wide.
- Heikki