Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery
x4mmm@yandex-team.ru
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: "段坤仁(刻韧)" <duankunren.dkr@alibaba-inc.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-03-20T17:05:53Z
Lists: pgsql-hackers
> On 20 Mar 2026, at 18:14, Heikki Linnakangas <hlinnaka@iki.fi> wrote: > > Zeroing the page again is dangerous because the CREATE_ID records can be out of order. The page might already contain some later multixids, and zeroing will overwrite them. I see only cases when it's not a problem: we zeroed page, did not flush it, thus did not extend the file, crashed, tested FS, zeroed page once more, overwrote again by replaying WAL, no big deal. We should never zero a page with offsets, that will not be replayed by WAL. If the page was persisted, even partially, we will read it from disk without zeroing out. Best regards, Andrey Borodin.
Commits
-
Fix multixact backwards-compatibility with CHECKPOINT race condition
- e35e466f61b3 14.23 landed
- a5f412107f98 15.18 landed
- 77dff5d937b1 16.14 landed
- 1ca38503219a 17.10 landed
- 0852643e1c60 18.4 landed
-
Don't reset 'latest_page_number' when replaying multixid truncation
- 516310ed4dba 19 (unreleased) cited