public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Don't reset 'latest_page_number' when replaying multixid truncat
Date: Mon, 16 Feb 2026 16:01:49 +0000
Message-ID: <[email protected]> (raw)

Don't reset 'latest_page_number' when replaying multixid truncation

'latest_page_number' is set to the correct value, according to
nextOffset, early at system startup. Contrary to the comment, it hence
should be set up correctly by the time we get to WAL replay.

This fixes a failure to replay WAL generated on older minor versions,
before commit 789d65364c (18.2, 17.8, 16.12, 15.16, 14.21). The
failure occurs after a truncation record has been replayed and looks
like this:

    FATAL:  could not access status of transaction 858112
    DETAIL:  Could not read from file "pg_multixact/offsets/000D" at offset 24576: read too few bytes.
    CONTEXT:  WAL redo at 3/2A3AB408 for MultiXact/CREATE_ID: 858111 offset 6695072 nmembers 5: 1048228 (sh) 1048271 (keysh) 1048316 (sh) 1048344 (keysh) 1048370 (sh)

Reported-by: Sebastian Webber <[email protected]>
Reviewed-by: Andrey Borodin <[email protected]>
Reviewed-by: Kirill Reshke <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected];lightning.p46.dedyn.io
Backpatch-through: 14-18

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/899de38d8f3b519e7fd5b2acf580d1c9282ee6f1

Modified Files
--------------
src/backend/access/transam/multixact.c | 9 ---------
src/include/access/slru.h              | 4 +++-
2 files changed, 3 insertions(+), 10 deletions(-)



view thread (5+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Don't reset 'latest_page_number' when replaying multixid truncat
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox