pgsql: pg_resetwal: do not allow zero next multixact offset

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_resetwal: do not allow zero next multixact offset
Date: 2026-07-27 13:08:35
Message-ID: E1woL4N-00000000WAN-3EZX@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_resetwal: do not allow zero next multixact offset

Offset 0 is the "invalid" marker in pg_multixact/offsets since offsets
went 64-bit and the allocator stopped skipping it. pg_resetwal could
still produce it via -O 0 or guessed control values, breaking the first
multixact created after the reset ("MultiXact n has invalid offset",
and vacuum of the affected table fails from then on). Reject -O 0 like
-m and -o already do, and guess 1 like initdb does.

Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFNoO6MUkg526TmA=mC_RjY2gp4VKCnvK6y12v3ppOkhJA@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2cad308cb8f1c88f97f617ef9281f08c2f722277

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 6 +++++-
src/bin/pg_resetwal/t/001_basic.pl | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-07-27 13:37:14 pgsql: Deparse FOR PORTION OF using the range column's current name.
Previous Message Amit Kapila 2026-07-27 03:45:19 pgsql: Fix issues in logical replication sequence synchronization.