From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_upgrade: Fix last multixid ending at offset wraparound
Date: Fri, 16 Oct 2026 14:38:46 +0000
Message-ID: <E1xHj54-00000001srK-0r6T@gemulon.postgresql.org> (raw)
pg_upgrade: Fix last multixid ending at offset wraparound
On v18 and below, if the newest multixid's members end exactly at the
the 32-bit offset wraparound point, the next offset in the control
file is 0. GetOldMultiXactIdSingleMember() treated that as an invalid
entry and dropped the multixid's members, so after upgrade accessing
the tuple failed with "MultiXact N has invalid offset".
To fix, only check for zero offset when it was read from the next
multixid's slot, like GetMultiXactIdMembers() did in v18. This is
unlikely to happen in practice, but better to get it right.
The bug came with commit bd8d9c9bdfa in v19.
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFM8BCazGz6s1Vn5tMEXYiXE2fi8T2rwmwXSty5gD+h9rA@mail.gmail...
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2323f03a1789bc52bee980c56b8057470458701a
Modified Files
--------------
src/bin/pg_upgrade/multixact_read_v18.c | 17 +++++----
src/bin/pg_upgrade/t/007_multixact_conversion.pl | 44 ++++++++++++++++++++++++
2 files changed, 55 insertions(+), 6 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: pg_upgrade: Fix last multixid ending at offset wraparound
In-Reply-To: <E1xHj54-00000001srK-0r6T@gemulon.postgresql.org>
References: <E1xHj54-00000001srK-0r6T@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox