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 1w5DqA-0031hi-1G for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 02:19:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5Dq8-00AaFc-0n for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 02:19:24 +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 1w5Dq7-00AaFU-30 for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 02:19:24 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5Dq6-00000000tDM-2OA5 for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 02:19:23 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 70C9214001E9; Tue, 24 Mar 2026 22:19:21 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Tue, 24 Mar 2026 22:19:21 -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=fm1; t=1774405161; x=1774491561; bh=my1SF/kMZV 5BgehKPf6E9kPf9WnFO+olM8h67A9BP1I=; b=WIvF3kCoaFb9EQsEk7MLZap8uo wBHnEHGGLEBnnJBESsU+T83xPwsuTgF8pAfvkTqrTDi5qgzYcJimdj5lnL7utC4W vsbzM3eBlMcKtTykw04NVNd6UIahGgaXBhqoi3uaT94DKDV2S7auk7VHu5O0y2UF IXfpP4RrM90TkHEweRnBwgDcmkcnT6qB7IM0krk4AyjvM6D7O9zQkkKN2n5ZvE3v Y3c1KBSCI/wmRg3SlTWkwOJimrX4mkpYDVoyS3zMQ8Aw1M8ZXDBVRYgJ6qkrx28X sXo25lHR0J7G+FoPawVRAeedfFAZMQ0d8q0XSotVJo24VYYSk+EpU8Si4NGw== 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= 1774405161; x=1774491561; bh=my1SF/kMZV5BgehKPf6E9kPf9WnFO+olM8h 67A9BP1I=; b=v1phzuz+r+cFEjOJ98Q3Aqv04g7EYcUl1bJbDBLKESCy9WfVVr8 Gk9PrUJ85PGWJptbOCv/OZ+WyAhNI5JX7naLBPzlKxlEaNBERklE7FEWLkA/KEZm WVmcdMG6iDO/vGUVcl1lRWj60fkdRgPEtp/EKk022ePASaGtPHPfGEzTEf56/2ER YGlUx2p6N7yLi4XMnQkCqtnXG8OWs8qu5RM7xGJphSDZ+vwTgTDqGJ2V9YN54GGI 6QuROGicUI3ftHq/7viZtpvaAgGhH3NVaQuTMGCfGuDRCA6ZawwLeKOFyg96X4HD iP+2/pxantVuXLJCFpedMtsYysD3C5zCeVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdefvdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtdorredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepffduleehgefhkeefgfeftdfhkedu tddvhfdukeeggeehieekffelhfelkeehteefnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshhrih hnrghthhdvudeffeesghhmrghilhdrtghomhdprhgtphhtthhopegrhhestgihsggvrhht vggtrdgrthdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpoh hsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Mar 2026 22:19:19 -0400 (EDT) Date: Wed, 25 Mar 2026 11:19:15 +0900 From: Michael Paquier To: Srinath Reddy Sadipiralla Cc: Antonin Houska , pgsql-hackers@lists.postgresql.org Subject: Re: Teach isolation tester about injection points in background workers Message-ID: References: <4703.1774250534@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f70OV52IKJZgbT7y" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --f70OV52IKJZgbT7y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 24, 2026 at 04:25:47PM +0530, Srinath Reddy Sadipiralla wrote: > +1. I was thinking can we move the logic of checking if bg workers are the > reason of blocking the main backend > inside pg_isolation_test_session_is_blocked > to make it cleaner, and regarding "XXX Should we use a separate query for > that?" > i am confused here IIUC if we keep it as 1 query using UNION every time its > for sure > that both the queries will run, which can increase more execution time but > less libpq/socket > calls, but if we send as 2 queries if 1st query doesn't returns true we > have to go and > check the other query, so here if 2 queries ran then execution + > libpq/socket calls overhead, > so i am slightly inclined towards separating the queries , so that if 1st > gets satisfied then > we don't touch the 2nd query at all, please correct me if i am wrong here :) Is there a benefit in this change outside the hypothetical REPACK CONCURRENTLY? Using separating queries may make more sense on readability ground, at least. -- Michael --f70OV52IKJZgbT7y Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnDRiMACgkQnvQgOdby QH1UJhAAiy/t1JRS5I3OVrymzxGwrXDDViICSsYVmMy9sbiPSA55w/+Y59JecDHx F6obmftL/MehSfPuAy1f302TuQXUX9esqP8v8h19mRidumyktM5VZXOLr5yfiKEZ aBTW5By1+ib4G5BY4nGBDnKpNVdm6j/7jXUQnraV2aLtbe0B1ebRGaqG/9JxbKG2 huC6mbF9AYTFaO+OI/tc7E8/qECtAkWAggMFr9KYkjLrgV9VynIwhpXyBiiwpyFU rqbe6ypoZwcJZbnxTk8THBF/ylhd78VCtbtZdyVThHn2qQp/zJ0dO9TS5SxwMqo0 uSAkqo4E5Yh4FDHazFL6r51GX5VLtKCDkpTfhH0fQlWuA1by1rEYzX7KRmeIcivh KkpaEpdMB+EWQdEWU8txRnOb5E78T+2daI0bYotFfQDTFLr9vFmERvMJj11QKK4m XyvalnqoH7okDCSBPsb0jPh4pDxdDiM2eDIUHC6jQNQuQ5Z3v5td6DkQccv3IuIY y5EGZUJ3enKMQzU5bEtQ7OnkrXMNApq7DmXPeIxEEoXRJ0H9ZhGDs7m2l6uaqPl/ DnjXwVutjulFhUj5M4Ya57G/yBAZciOZpS8Fj99jGXW00Sl5fEh6WVEeCMN5Wtje KwuULQ/xKU3PQTwcMzI9OCAvWY70kadNNeePGlMYEJptqjCPNXs= =RaEj -----END PGP SIGNATURE----- --f70OV52IKJZgbT7y--