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.94.2) (envelope-from ) id 1vGJt3-00COym-CY for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 16:28:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vGJt2-00Euyu-2z for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 16:27:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGJt1-00Euyj-9j for pgsql-hackers@lists.postgresql.org; Tue, 04 Nov 2025 16:27:58 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vGJsw-005xXl-2M for pgsql-hackers@postgresql.org; Tue, 04 Nov 2025 16:27:57 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 9A0D6140023A; Tue, 4 Nov 2025 11:27:51 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 04 Nov 2025 11:27:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1762273671; x= 1762360071; bh=S0HgnSKLpTNaiLWzd/P+hSVESFmGBhgfo2RTjHmv1yc=; b=e 7NRFDsMCSRsFb+mD1Ahp69QRFwpH4L2T9ByxM3LvqW39fMdhnF3zMuRttZ4nI1lM O0p2WgSCcOIT+7z1PQnoH4LL+mIj96L1UrR1pyZXJrGFxZRcvfXfxHBFpq9gDEf0 WHttruxAZQ/0QL9AHhAv3OKtGaSDbbCSjoV8AOyfU0szgBijNs7T1U4o9PFQHpCl NRS2HPptuPB2KcqomXAArRFN75QhWOJoFDM56QbnqZUwVnVmT8kBRQPRGVVc4aRk slen4+aDrajU3ua+bkkRfpSG1tCecAhCQ87NPPQ+ER7Ghvl4iryxGVfEOuUpxuzq OCC3ZwO2lgSve5S6SrEPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1762273671; x=1762360071; bh=S 0HgnSKLpTNaiLWzd/P+hSVESFmGBhgfo2RTjHmv1yc=; b=t6saYoxYVvb++zf75 KJjZeJJ+1bZQRvPfmaslLjJjx6wy/aS0FktvAlx9RCBFNlwNLMvId1uaab2Yb/SB kAlIKnggnQngJ+j0ijMt/r6xv0zxGfGztpIVujaOWOilox9lFuhuMJnMXa5+npbZ EtSz6D7HrNo2HFeomACZaQjQOkNX48hCwQARQyKovL5mPU89iYpT33OTPlEOdFtJ 9ikc9yPlbUKjYguaNc48i9yt7kpcDXEh6fAOQJLLv/FRdM3CHFHaH0MbMXcrdIic 9eEScty8qJTQxFucd4S08nPvYKgFx2Xm+z1GytVmr7+kSOvqxks7ZzXw/BpIk9pI dJ8qw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeduhedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehjohgvlhestghomhhpihhlvghrrdhorhhgpdhrtghpthhtohep hhhlihhnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrh hssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehtghhlsehsshhsrdhpghhh rdhprgdruhhs X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Nov 2025 11:27:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1762273668; bh=gGCPwDlgEi+oHVm4okERA2Yn47zB1b97jZ/szVEX1Sg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=5BrK7Tv2wu7GylHYHIoZcaAVFT8jDki15kTVt+TGLOZQ9qPPmZUO0B5bn/JmTp7jW 2hYQCEQepN+QwMRQJCTDd0v2uIbg5y2O/UwfiWFx3ofLjeJeeMR9Gm4et6W80uNrkv L/BlbSLZ2bKUDQ6DrgRQrfKwl9zMHy44PfuYL+PsNw+DPnvx6uhgT+DKWnodTY/+hi 8h2AKs4YQYFKk8eT87yA+qk+qoDKnEuip50vS4yOJZRnsH2e5D+mCy95pJyVgl0XNJ XHyZxmue1jA85RTtjoa3/KdB8CfG6RiIvn5oa0UF7HG2NdKlZBlunEA0Ra8u6MGI24 TGBoNDrTqzX4A== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 3791076; Tue, 04 Nov 2025 18:27:48 +0200 (EET) Date: Tue, 4 Nov 2025 17:27:48 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Heikki Linnakangas Cc: Joel Jacobson , Tom Lane , pgsql-hackers Subject: Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue Message-ID: <202511041624.uthdnt3tzhm2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <66213fee-00ff-4952-802d-c06454e521ac@iki.fi> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Nov-04, Heikki Linnakangas wrote: > From 7c342e6efffc8d59c2e7658f6f2f3b138d02e0bb Mon Sep 17 00:00:00 2001 > From: Heikki Linnakangas > Date: Tue, 4 Nov 2025 13:22:08 +0200 > Subject: [PATCH v2 1/2] Fix bug where we truncated CLOG that was still needed > by LISTEN/NOTIFY > The async notification queue contains the XID of the sender, and when > processing notifications we call TransactionIdDidCommit() on the > XID. But we had no safeguards to prevent the CLOG segments containing > those XIDs from being truncated away. As a result, if a backend didn't > for some reason process its notifications for a long time, or when a > new backend issued LISTEN, you could get an error like: > > test=# listen c21; > ERROR: 58P01: could not access status of transaction 14279685 > DETAIL: Could not open file "pg_xact/000D": No such file or directory. > LOCATION: SlruReportIOError, slru.c:1087 > > Note: This commit is not a full fix. [...] The commit message doesn't say just _what_ does the patch do to fix the bug though. Looking through the code, I think you're setting XIDs in the async queue to frozenXid, but I think the commit message should explain that. Thanks for spending time on this. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La fuerza no está en los medios físicos sino que reside en una voluntad indomable" (Gandhi)