public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrey Borodin <[email protected]>
To: Heikki Linnakangas <[email protected]>
Cc: "段坤仁(刻韧)" <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery
Date: Fri, 20 Mar 2026 14:55:52 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <c4ef1737-8cba-458e-b6fd-4e2d6011e985.duankunren.dkr@alibaba-inc.com>
	<[email protected]>



> On 19 Mar 2026, at 23:11, Heikki Linnakangas <[email protected]> wrote:
> 
> :-(. This is a gift that keeps giving.

Well, maybe, we could leaving that deadlock in place for some time...

> Idea 3:
> 
> I think a better fix is to accept that our tracking is a little imprecise and use SimpleLruDoesPhysicalPageExist() to check if the page exists. I suspect that's too expensive to do on every RecordNewMultiXact() call that crosses a page, but perhaps we could do it once at StartupMultiXact().
> 
> Or perhaps track last-zeroed page separately from latest_page_number, and if we haven't seen any XLOG_MULTIXACT_ZERO_OFF_PAGE records yet after startup, call SimpleLruDoesPhysicalPageExist() to determine if initialization is needed. Attached patch does that.

SimpleLruDoesPhysicalPageExist() does not detect recently zeroed pages via buffers, because it goes directly to FS.
I tried this approach when implementing deadlock fix, it did not work for me.


Best regards, Andrey Borodin.




view thread (7+ 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], [email protected]
  Subject: Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery
  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