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 1rhk8c-00D92h-FE for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 05:48:23 +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 1rhk8b-005jiQ-2X for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 05:48:21 +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 1rhk8Z-005jiI-AU for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 05:48:21 +0000 Received: from wfout3-smtp.messagingengine.com ([64.147.123.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhk8V-0031t3-Lg for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 05:48:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id AA4871C000F0; Wed, 6 Mar 2024 00:48:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 06 Mar 2024 00:48:13 -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=1709704092; x=1709790492; bh=iMExS88SsP Lhe+AyZFvt5iuRyAVCfNthVeV62lYhl0g=; b=Rbh/WMIzTrBZezhKZFba/pLuCZ robAcoHYKK4ux7bQ4s3Gs7uChXnAQhUrcCOBERfc3CWYOUBBU3opGd6A5TvZS5Xl EW787Y/10FW4xXDx90gt77SNRVI4JOSBV3behlUW7SDPvItlWywrUEbNyccsO7kv 8Xdxbd40cYzqCSKZ5iO6J7mem8D14agpRE86I35M51QGi3e/8W/4aeg2XyflzhRE zgZqv9JB70F2luySbhvmXEZBeCLnuHQ0iLuMq4DUD/Mty9ys+qX2my4dBYdMVAjk NF97RT5GVQYi/S/XpNiuKlklV3B/kS8fLX+6Ort0vkNqYkLNYRzUQQrWrFQQ== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709704092; x=1709790492; bh=iMExS88SsPLhe+AyZFvt5iuRyAVC fNthVeV62lYhl0g=; b=NqhZmoavW5ZxAq3XbUdXxmRXiZnTSLgARsobUwD0rMgW Bs2xvGJ29ZD2S/wMTJzfItBLnNTbQsWiPy0nk0O+Y/APZg1Jqio8eeEAy3K7q2N0 Pi8EGuUQyxcHX8qeGf8pYy3i3BRqWMQvc/OdL6jyCbuNVcjP/qohTXzW8oS5q5w5 KP7ZayD3pXVarkT6QRlyOYZGR2CU3l65Qi5WIPXpKX6SuaQ+mH44tRvtd6TYT/Y1 xp5S0i0UByCYRZzt+qkwwjtiHL749FusgIcoLByDPyquEIyzhrntK6eMvwn6gqPK ITIlrOe44yl8K6sIpfcx2JKP/AABolncAVkttOdgDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedtgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf evuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpeetleeifedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthh grvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Mar 2024 00:48:10 -0500 (EST) Date: Wed, 6 Mar 2024 14:47:55 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Bharath Rupireddy , pgsql-hackers@lists.postgresql.org, exclusion@gmail.com Subject: Re: Fix race condition in InvalidatePossiblyObsoleteSlot() Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="P+BWhkz4qHrqiyai" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --P+BWhkz4qHrqiyai Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 05, 2024 at 10:17:03AM +0000, Bertrand Drouvot wrote: > On Tue, Mar 05, 2024 at 09:42:20AM +0900, Michael Paquier wrote: >> First, in a build where 818fefd8fd is included, this makes the test >> script a lot slower. Most of the logic is quick, but we're spending >> 10s or so checking that catalog_xmin has advanced. Could it be >> possible to make that faster? >=20 > Yeah, v2 attached changes this. It moves the injection point after the pr= ocess > has been killed so that another process can decode at wish (without the n= eed > to wait for a walsender timeout) to reach LogicalConfirmReceivedLocation(= ). Ah, OK. Indeed that's much faster this way. > I try to simulate a revert of 818fefd8fd (replacing "!terminated" by "1 = =3D=3D 1" > before the initial_* assignements). Yeah. I can see how this messes up with the calculation of the conditions, which is enough from my perspective, even if we don't have any sanity checks in 818fefd8fd originally. > The issue is that then the new ASSERT is > triggered leading to the standby shutdown. So, I'm not sure how to improv= e this > case. It's been mentioned recently that we are not good at detecting crashes in the TAP tests. I am wondering if we should check the status of the node in the most popular routines of Cluster.pm and die hard, as one way to make the tests more responsive.. A topic for a different thread, for sure. > Done in v2. Reworded a few things and applied this version. -- Michael --P+BWhkz4qHrqiyai Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmXoA4sACgkQnvQgOdby QH3fMA/7B27pCEY3pPwMYbFvxIiVgH/FIhiDkAiSZLIrUcSFuHwZ6QRVpdmbWh+u rK8yzygY8QfadIa13l34n5eqcO3Vgmsd2Xx1GJ1JAxRsgV5L/E1mJnPuCg/nWxPV TQ27kmjUMpvPK+ikZWEQlv8lBGj2h8pWtVrLqLH99mTaTFtZPya6Y0jeSrgyCmlM nCdu6Zuy34cLZIWM9ONQ6GrB1NK1DkJuvdrVYAMkV7gzvvdUuEOkkJD6/co/Vc/g ZqpVn88Qq1nazedoHDIkIVHp7EXoy0ucI+TrGZWZij0O2sSoj3eGWcaQhRG4fv0t n2PzfpDHCksgIpBAicVvETlK331HQFPSmRuJNiw9D4LgHH2cBkqG0uaJsSz9CEns 6lv+WsX3Oh9R3x7gPe/V6gv63TZY73dNd+AyR8M5VnbNzvdYUD6JuDgmrPOF/8cw bOcbLvg13nWA8odBFvd9+rNnuhp3jRlxjyvwCU59cZvfatVMsaH4wSAZ+hMZsMZu Mq5uYogR291jcQvkTTrat1zdugRJzRvktpVNfZ9HmL7v7Pfbv2aWPvuVYdCRQSrK +H3Ox43yPVEMorToiBUQT2c5VCWpUbVng3tf4HwZYeDoRzqFCRGxc49p0EkJTn/2 qxDyKbSkADcsBtsSlg2GH38CG63JCqKjxD4k653FJWAjbRAUCrE= =bxqC -----END PGP SIGNATURE----- --P+BWhkz4qHrqiyai--