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 1w7Cgj-005464-0Z for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 13:29:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7Cgh-003Rit-27 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 13:29:52 +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 1w7Cgh-003Ril-19 for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 13:29:51 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7Cgg-00000001oDP-0PbX for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 13:29:50 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-486fe655187so58581645e9.2 for ; Mon, 30 Mar 2026 06:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1774877389; x=1775482189; darn=lists.postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=csVZPlDoHw8wgLS6PRZFFFKHov1pFRn/exDyWlpvMpk=; b=AmiqNJv0p3g5S3sFTY44cxdKt960yLysj/udlzwT/CL0D6q+ErXDcdi3q8bh0vj7nF A8AnLngG9+oVomV6FfnsnlSE74ZCIL7euuU2PF2P74BKyMd9ECj3MggzMXRFcz9v2NDh tGrDsmUL7LDEbS4vyo3fvuzZTSolYIvrvB4xDpz2d9tivbGZ4F+ree42pUnElV3zsKGi sa/RPLFRBcM9Dlp6z3tMg/GxKh9G4DILcZjpeLfc8gQplwpE0R9YrO+lYzWElPpLbOzr dBVQRemZdPyM+XC0FdBfeBqGMWlXMcM5V5nOelirbC8hciYopSrnDL+rqzslTNBTkhSf eV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774877389; x=1775482189; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=csVZPlDoHw8wgLS6PRZFFFKHov1pFRn/exDyWlpvMpk=; b=OgU+1mEHrsS9PTRvxGQQl/afYHeAnIHXqVCx9hcJ0cB3g4W8iqawXw0Mmf7ItXW5WN l52gnQnMAsIK65Ecv21+Q4t6wyWJ+vIMnGj7CU8s0OaqeIPAwizKah3CqPos3IrOyUn9 cy84xch7ngDRAtnWRIbeKTvgVyUXMBhH5H3qE4M8IoTFiWpWK18sbnniEyoEOSa0AVLN cqyx95j02FJt42uzOqPJ635czgxvrZ892N+1yKcnXklGcKd247L/zpshvYHnJese6+EP q1aPlQdtAB9jEa34MgS8hOhaDBCPSgUUhYSAkjdyU4ifQfaZPUBI1FnfUGisj3b5OfTC Kz1Q== X-Forwarded-Encrypted: i=1; AJvYcCUSzyxMc6AegIh/lJM+NXa8060FbIF2D1teauWmbEQ5sdanKxf1+G+ro2zJruxn8d6Pzn0a9On0Pk8QTZmj@lists.postgresql.org X-Gm-Message-State: AOJu0YzytU7UemXtqFTh227xc9MiEfe7mj913Cjea+6S5vTMyiY+Z7z4 Df6K0EkbJSvLrSVnwY/ac4Yj8UvHAJFIsMsY2OOTw+2jTJse/LI3F6b9lq5lCbV8D38= X-Gm-Gg: ATEYQzwGyNUVw1uyxbYCc0AbHhs5wPhWoLKMgWWP7WOtn4v+I6WD7zMBkzTFO73hUUO rkjvuxNzDEn7qqo1ayjgYOkiIriKFjqUQ8JGZpj+r3a494XjQ8R2oas22ugtOtKRmbQYp/muUe6 e2F+Rxc/kC8HA8xhkGgrxri7p/rVesIx2dlO9yKGATDJrFuVkrB92JU/wsIvFL0Hn52xEl85KG5 r9c3YrADaIw6Wfks6Ap+9cTleDO7T/I2dP5wMcRdAHWy24uxZCHtvpjEGIVtwx794FGprjXedDX LzJw+gakru8Ldl7nxozGV43XYQOUOK7REN2Kw63EBAVc8HTB3TbjsnzhDepqtUHmHsPQEzzR+z+ EUihgeTQBGrSrAoK0HegkCCIv1//nPkQAzetNZAk9k4Rou66G0tmQd4rm9i8atfIAZ7eHd6iCmx gGImsJWSE/kSHVpzAd65KsrssrWUBQJbCHa6ol X-Received: by 2002:a05:600c:c8f:b0:487:21c7:2885 with SMTP id 5b1f17b1804b1-48727d45a8emr212873565e9.5.1774877388592; Mon, 30 Mar 2026 06:29:48 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48735faac9dsm76722755e9.0.2026.03.30.06.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 06:29:48 -0700 (PDT) From: Antonin Houska To: Michael Paquier cc: Srinath Reddy Sadipiralla , pgsql-hackers@lists.postgresql.org Subject: Re: Teach isolation tester about injection points in background workers In-reply-to: References: <4703.1774250534@localhost> Comments: In-reply-to Michael Paquier message dated "Wed, 25 Mar 2026 11:19:15 +0900." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <98379.1774877387.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Mar 2026 15:29:47 +0200 Message-ID: <98380.1774877387@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier wrote: > On Tue, Mar 24, 2026 at 04:25:47PM +0530, Srinath Reddy Sadipiralla wrot= e: > > +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 tim= e 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 w= e > > 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 h= ere :) > = > Is there a benefit in this change outside the hypothetical REPACK > CONCURRENTLY? Not at the moment. Perhaps I shouldn't pursue this patch until there's an injection point in the tree that needs that. > Using separating queries may make more sense on readability ground, at > least. Agreed. -- = Antonin Houska Web: https://www.cybertec-postgresql.com