pgsql: Don't reset 'latest_page_number' when replaying multixid truncat

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't reset 'latest_page_number' when replaying multixid truncat
Date: 2026-03-22 12:29:21
Message-ID: E1w4Hvk-000vzD-3A@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 was committed to back-branches earlier already (commit
817f74600d), to fix a bug in a backwards-compatibility codepath. We
don't have that bug on 'master', but the change nevertheless makes
sense on 'master' too.

Reviewed-by: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Reviewed-by: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/20260214090150.GC2297@p46.dedyn.io;lightning.p46.dedyn.io
Discussion: https://www.postgresql.org/message-id/e1787b17-dc93-4621-a5a1-c713d1ac6a1b@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/516310ed4dba89bd300242df0d56b4782f33ed4d

Modified Files
--------------
src/backend/access/transam/multixact.c | 10 ----------
1 file changed, 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2026-03-22 15:55:45 pgsql: Detect and fix visibility map corruption in more cases
Previous Message Michael Paquier 2026-03-22 06:26:33 pgsql: Add test for single-page VACUUM of hash index on INSERT