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 1vxfjv-00H1fX-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 06:29:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxfjt-00AhDs-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 06:29:45 +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.96) (envelope-from ) id 1vxfjt-00AhDk-0S for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2026 06:29:45 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxfjq-00000000Tpo-3gV0 for pgsql-hackers@postgresql.org; Wed, 04 Mar 2026 06:29:45 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id 0C61B1D0022D; Wed, 4 Mar 2026 01:29:40 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 04 Mar 2026 01:29:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1772605780; x=1772692180; bh=sOP5Sz3bks OU+ZPUfE+qd6Gz91LbIihQeKPj+fVEj1o=; b=lza9vAn0cghEmMvauKnML6+GVs 9Bu8WRoVfOpokpAbZemna/cskD6Bt9r7IawhfkeuI//xSN1UfoUbFGcu4q8LCLhM im+mE9KaumHuSARk38lZFg8chlttRCLSJSkpOFGZLL+RuJjXFHL1tXaw6shumqIE d6yVisXF8WWgRIU3ocUD5nFzhFSzvs/LK4FWUJ4y+w5O6R5TLCPEg7cQKPZu2RlR VBxN3EOq+C1Zw9oFcLEtWmD0LwS3iArf8mLAMxfKyEwQBTLquuk0wPMafeUEA79L iYiZq2xYYLyFLD5zqygkv0T16DYVhc83Or5a021HFPamhc1ViEoxOEhHflrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1772605780; x=1772692180; bh=sOP5Sz3bksOU+ZPUfE+qd6Gz91LbIihQeKP j+fVEj1o=; b=16UPFytws5yLFIBIvkq7HtX/DUeV2SIgA8jOMouhhj29nLVi1IG WUxI/v45CiTByXapeP0qfLKnmNHwlvxFGgTMRAg5L+TpRRpX3an1yGztPiWqytii SofNu8X7BVXyyjR9qRD0wuu8avcIRGnF3FfvL4sknUOnzS9giC9/eUHG59hugv6h Np4pcDGpnkT7at3IHhgYmyzYZudqja06+0tT160hHwT35komff7lFZ8pGu+71ayB mqaLRUrN4a9wZLX6kgCpXVlMnXQtWdfGL8VO9LMP57gQZiVVvWvotGr/a77asNYS +qNi2Jtl+Mpx74pznQSdqAJacZJUlHRsz/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddviedvjeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhhurh houggrrdhhrgihrghtohesfhhujhhithhsuhdrtghomhdprhgtphhtthhopegvgigtlhhu shhiohhnsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsh esphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprghlvghkshgrnhguvghrseht ihhmvghstggrlhgvrdgtohhm X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Mar 2026 01:29:39 -0500 (EST) Date: Wed, 4 Mar 2026 15:29:35 +0900 From: Michael Paquier To: "Hayato Kuroda (Fujitsu)" Cc: 'Alexander Lakhin' , pgsql-hackers , Aleksander Alekseev Subject: Re: BUG: Former primary node might stuck when started as a standby Message-ID: References: <63e55743-669e-4300-a561-7b7ff63723b6@gmail.com> <045cab6f-4738-417e-b551-01adba44d6c3@gmail.com> <493401a8-063f-436a-8287-a235d9e065fc@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YwT3f7FzlMHbiXyy" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YwT3f7FzlMHbiXyy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 04, 2026 at 02:31:29PM +0900, Michael Paquier wrote: > As a whole, it looks like we should just switch the teardown() call to > a stop() call in the first test with xact_009_10, backpatch it, and > call it a day. No need for injection points and no need for GUC > tweaks. With a little bit more patience, I have reproduced the same failure as Alexander using the bgwriter trick, -DWAL_DEBUG and his reproducer script with parallel runs of the 009 recovery test. The attached patch is also proving to work. The failure happens at the 2nd~3rd iteration without the fix, and the tests are able to last more than 50 iterations with the fix. As far as I can see by scanning the history of the test, this is a copy-pasto coming from 30820982b295 where the tests were initially introduced, where teardown_node() was copied across the test sequences. As we want to check that a promoted standby is able to commit the 2PC transactions issued on the primary, a plain stop() will equally work. I'll push this fix shortly, taking care of one instability. Nice investigation on this one, Alexander, by the way. -- Michael --YwT3f7FzlMHbiXyy Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmmn0U8ACgkQnvQgOdby QH3z6w/7B9bIK/e9l2U88uDXILXnMmV9NENQYNBJ7wiPi4yqf2xlmFViTckxnwO0 tl7Kk/HlEWTbpdXxOh9u7UvcaC/Ss9yIOpKXZaae5+xKkxFwknNVrc0OOWIB7EZh rg4qWFnGwauGk7ZDSJ8hkwGdUV4g+LVDDZlBJ7ALCmu6nFJSVCiFH+NiCrza8g+W Pch93oz4Q+TCqhMo/ZZUkotvlj0y5NpzjaCxOf/eu4+8Br5CZdOOYsLWjZV6gMj0 9K9cWbJ+CuXLqRHCH4mFn+NeJuZ20qFkhzlc2bO1WuCyOJNTd9JdEce/f2++pLJu WXayUh9VITpa8kcGtqTqAoC+W6eoI5V2hlk0AG9d17IH/TIEtkKTqBm1IFZqkXmx EE+mqeUc8b4Gt7jJtZLIDuiJQOG8TUL+/OjC0Zott2guYKWnojQ/vHDnKmzcV4+6 CPgzaADUHVwCY36AsmhPHG6ji++CO5m7U8vAT5F6jL0aicbUd2iXFGsTiGHL1Fsi bYzU5F/kH9qewkReQ6SzySFdJzx6HJK1cc/oerAn75rei2JOxc1d2jdlN5xn7x7V baov+LSFviUq59fwqiPHkMRZc6gkI6MmP1LDgAHdd5cwb25LgzabG1/aX+aAbgPg Sar00GHS3Hr1ZDgJgq6Pp4XWaRR6cXzDCIybaLty4oUMjM3kYis= =Jf+D -----END PGP SIGNATURE----- --YwT3f7FzlMHbiXyy--