pgsql: Add runtime checks for bogus multixact offsets

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add runtime checks for bogus multixact offsets
Date: 2025-12-11 09:31:35
Message-ID: E1vTd1K-000888-0V@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add runtime checks for bogus multixact offsets

It's not far-fetched that we'd try to read a multixid with an invalid
offset in case of bugs or corruption. Or if you call
pg_get_multixact_members() after a crash that left behind invalid but
unused multixids. Better to get a somewhat descriptive error message
if that happens.

Discussion: https://www.postgresql.org/message-id/3624730d-6dae-42bf-9458-76c4c965fb27@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d4b7bde4183bc39c6d7a22d22188fc4aab2ba8d1

Modified Files
--------------
src/backend/access/transam/multixact.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Christoph Berg 2025-12-11 12:29:14 Re: failed NUMA pages inquiry status: Operation not permitted
Previous Message Peter Eisentraut 2025-12-11 09:02:26 pgsql: Make <assert.h> consistently available in frontend and backend