Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w3YSd-001LE3-2B for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 11:56:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3YSb-005igD-1W for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 11:56:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w3YSb-005ig5-08 for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2026 11:56:13 +0000 Received: from forwardcorp1a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:df01]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w3YSX-000000009xk-1mRk for pgsql-hackers@postgresql.org; Fri, 20 Mar 2026 11:56:12 +0000 Received: from mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net [IPv6:2a02:6b8:c2d:3530:0:640:eca4:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id C639BC020A; Fri, 20 Mar 2026 14:56:04 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:c77::1:28]) by mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id 3uN9Sk2AiiE0-Z1srRTeA; Fri, 20 Mar 2026 14:56:04 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1774007764; bh=Lnphdlv4KJT4mI0rFEB8gNxqaPe4tsRNBecGqmLA/9Q=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=peoMUxJyi6etkYnGb/Z7VLIRJSZ/pdaeuDfjv4VJtl1tkzSm0LSRyy4PoY4Gl7yND XO2jhBpSxevSavMQYvD6WlvMaMuwsDMSjL+FPvCNPBFFPqjPAlkCNI2dOFsAvnXF1v UFtMohb5ae+9QXH56fzRdaK51UTVWiTXCnwmfDRk= Authentication-Results: mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: Bug in MultiXact replay compat logic for older minor version after crash-recovery From: Andrey Borodin In-Reply-To: <18a40051-abc2-4fc2-8dcc-4dc39aa3e79e@iki.fi> Date: Fri, 20 Mar 2026 14:55:52 +0300 Cc: =?utf-8?B?IuauteWdpOS7gSjliLvpn6cpIg==?= , pgsql-hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <18a40051-abc2-4fc2-8dcc-4dc39aa3e79e@iki.fi> To: Heikki Linnakangas X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 19 Mar 2026, at 23:11, Heikki Linnakangas wrote: >=20 > :-(. This is a gift that keeps giving. Well, maybe, we could leaving that deadlock in place for some time... > Idea 3: >=20 > 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(). >=20 > 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.=