Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: "段坤仁(刻韧)" <duankunren(dot)dkr(at)alibaba-inc(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery
Date: 2026-03-20 13:39:32
Message-ID: BD37E553-A017-4D2C-8203-702378BF5882@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 20 Mar 2026, at 16:19, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> Hmm, after startup, before we have zeroed any pages, it still works though. So I think my patch works, but it means that tracking the latest page we have zeroed is not merely an optimization to avoid excessive SimpleLruDoesPhysicalPageExist() calls, it's needed for correctness. Need to adjust the comments for that.

If we are sure buffers have no this page we can detect it via FS.
Otherwise... nothing bad can happen, actually. We might get false positive and zero the page once more.

If we got init_needed==false, maybe cache it for this page and set last_initialized_offsets_page = pageno?
Or, perhaps, XLOG_MULTIXACT_ZERO_OFF_PAGE will do it for us anyway, but a bit later.

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-03-20 13:42:04 Re: SQL Property Graph Queries (SQL/PGQ)
Previous Message Jianghua Yang 2026-03-20 13:32:46 Re: [PATCH] initdb: Treat empty -U argument as unset username