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 1w9dY1-001bex-32 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 06:34:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9dY0-006xC1-0R for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 06:34:56 +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 1w9dXz-006xBt-2h for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 06:34:56 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9dXx-00000000rEo-1rgq for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 06:34:55 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id CD27F7A017A; Mon, 6 Apr 2026 02:34:51 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Mon, 06 Apr 2026 02:34:51 -0400 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=fm2; t=1775457291; x=1775543691; bh=trt3QBtCYX oqOuDU+E3Y9K1FzBloHkftllngA3iEc7g=; b=FagLokq5QoNm/g03zN/ZsK3DAr 1zWoNEkwp6iVtP3kc7c4RluC8GoB8rVshBg7A7baSknzNLcsjd6RK6Az0gte3+10 ax4lvpRlCAJGelF3XBhYWiOsHcA2MhdymiZDU7TnjmcyoCRmD4Se9KmadeK3N4Hi lr3z6E+eB0YGsdQnmE1mXr7gHKbueUIGLaXKXuoLXSvq7tc/JOW/KsR4GrIQa+w7 RcQPwq/XaL+JSr0B9ma5t4nMEmU8qULCf9yPMDgCcy9yxrJMSuYaWpRwe6B5wzLs MgSZe0F9RjScuYpgRg/8nXyCA5BY1ys0wORFNzOJKY4ASj/cY3HN8xT1SisA== 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=fm2; t= 1775457291; x=1775543691; bh=trt3QBtCYXoqOuDU+E3Y9K1FzBloHkftlln gA3iEc7g=; b=bU8QsUEHcVD2UJIpYtI3W6ilXRm3Eq9ms5cuznW1p6ZYBvboYM2 fInwHvm5sCdDYle3zehMW6rg8t5s8l6ZgsxfTTBgoK0NdbX/DsNHq6QSa723cYcx w4BIjGQp9489uIQa8kcItg+z3rNx81vRUXeD8dTX7bdOMrKN34wGTjG/eh7kTULb +T4LI4RCpoOXOk/rYT92HNrMRic6KJXdrHgnm+3kYFCWHkedn0M2ttOFTsx1gbYF MtQ9LOTIzU5pCy4y2Q3CXS7Q/50M7tK9VpV6jb0/NSFNFiZi4tEsgOzZcYuK+II5 MqP+93Z12dUb+V+qsY+FFyb75K4JOFRMUlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduieelkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhgurh gvshesrghnrghrrgiivghlrdguvgdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhv ohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlsehjqdgurghvih hsrdgtohhmpdhrtghpthhtohephhhtrghmfhhiughssehgmhgrihhlrdgtohhmpdhrtghp thhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Apr 2026 02:34:49 -0400 (EDT) Date: Mon, 6 Apr 2026 15:34:44 +0900 From: Michael Paquier To: Andres Freund Cc: Bertrand Drouvot , Jeff Davis , Greg Sabino Mullane , pgsql-hackers@lists.postgresql.org Subject: Re: Adding locks statistics Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="B1Vth0I1wvE6+pfY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --B1Vth0I1wvE6+pfY Content-Type: multipart/mixed; boundary="KWbL1xaOnEIr99Se" Content-Disposition: inline --KWbL1xaOnEIr99Se Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 06, 2026 at 03:19:57PM +0900, Michael Paquier wrote: > Now looking at it, and for the reason why 010 for concurrent indexes > does not complain.. This one was a simple puzzle: there was a race condition between the detach done by a local point and the wait/detach sequence. As we want a detach, dropping the local point is proving to work here. I am going to do a few more runs to gain some more confidence. Bertrand, could you confirm please? -- Michael --KWbL1xaOnEIr99Se Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=0001-Fix-detach-timing-problem-in-lock-stats-test.patch Content-Transfer-Encoding: quoted-printable =46rom 684a26ad148a6d3d4261a633978702f76d7ee537 Mon Sep 17 00:00:00 2001 =46rom: Michael Paquier Date: Mon, 6 Apr 2026 15:34:03 +0900 Subject: [PATCH] Fix detach timing problem in lock stats test --- src/test/modules/test_misc/t/011_lock_stats.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/modules/test_misc/t/011_lock_stats.pl b/src/test/modu= les/test_misc/t/011_lock_stats.pl index 58a0046a52c3..908ade55a05f 100644 --- a/src/test/modules/test_misc/t/011_lock_stats.pl +++ b/src/test/modules/test_misc/t/011_lock_stats.pl @@ -31,9 +31,8 @@ sub setup_sessions $s2 =3D $node->background_psql('postgres'); =20 # Setup injection points for the waiting session - $s2->query_safe( - q[ - SELECT injection_points_set_local(); + $s2->query_until(qr/attaching_injection_point/, q[ + \echo attaching_injection_point SELECT injection_points_attach('deadlock-timeout-fired', 'wait'); ]); } @@ -59,10 +58,11 @@ sub wait_and_detach my ($node, $point_name) =3D @_; =20 $node->wait_for_event('client backend', $point_name); - $node->safe_psql('postgres', - "SELECT injection_points_detach('$point_name');"); - $node->safe_psql('postgres', - "SELECT injection_points_wakeup('$point_name');"); + $node->safe_psql( + 'postgres', qq[ +SELECT injection_points_detach('$point_name'); +SELECT injection_points_wakeup('$point_name'); +]); } =20 # Node initialization --=20 2.53.0 --KWbL1xaOnEIr99Se-- --B1Vth0I1wvE6+pfY Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnTVAQACgkQnvQgOdby QH2Q3g/9Fe/MD5Zyg09lWHHH0Bvyzo1CWhvLMPYszWVjv7RKEAKQIs/IOxU0IXQ0 qRPLotvzEYXk/iQhumPLnyJq0cgk086KSE+tG9OjfVMaRpMVqEEQR4ebU5/CBwQH iN9ojZ/GokSZisGRRwKvha+AV9iTAjlxZqh0hwqdEyfWTiN6R8k9/BiCzbPDZv6Q +uT6SWiw8UwB5XEJnsEKqUOdl2erxJa4jih+3Kgn5R3vkD0yUmCDgzbk2tZXVJ3Q 3W2T2lcJAqeJQkAqrh+LRl5F4FW4ByMha4qA+oDIGEm9REGPdMWiURNBdzoX17LR zhQdJ8SEe/s/leTRyj1SKGdDMGPNfgzWzGRPQEyquCn83GqVRazEUq9+iB+1d1E2 BaS4+tWKO8sw2XtBG3IWTQZcpzKYGgBnRPPE4u2j451DYlN9iz5HqnM/RSHMHh7B H8tccxqXTzyZFe2jtob4ZQt2t+7dMOIPfDfw+3JbvjYiMj0Ftx3GDMEdubJ8TZgZ yWSJWzW3W8pIux5SV1GXpwgMB/cr/lz00XlgmnjMiuweymHKHIXYRMzzXZVjWhcR +SzsDVFLEaOjzbztih2WqoYJ5mS0AGwxuYtdTlb5HVK8mKT+2jvTDh6OfFvwKTbU a5Doh4rgbuKVBcgDuHtH96EuCyfao5UZ6AJl9mmyNHLWUBROsgM= =eolU -----END PGP SIGNATURE----- --B1Vth0I1wvE6+pfY--