Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Champion <jchampion(at)timescale(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Date: 2023-03-07 12:38:14
Message-ID: 4dd273c5-f594-1c04-3710-5811e62b18db@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-03-07 13:03:05 Re: Raising the SCRAM iteration count
Previous Message Juan José Santamaría Flecha 2023-03-07 12:36:59 Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32