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 1u719z-0099vj-Fj for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Apr 2025 00:06:48 +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 1u719w-009IKu-0P for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Apr 2025 00:06:44 +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 1u719v-009IKH-1t for pgsql-hackers@lists.postgresql.org; Tue, 22 Apr 2025 00:06:44 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u719r-001JHL-0P for pgsql-hackers@postgresql.org; Tue, 22 Apr 2025 00:06:42 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id B44DB1380411; Mon, 21 Apr 2025 20:06:37 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 21 Apr 2025 20:06:37 -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=1745280397; x=1745366797; bh=2gqldzwEyu 18awpS8PWU1G10qqSV6M8GqFSoxg6eWFs=; b=jJXzhFq7O6JWR2xTnxYU8KFJQt fCFxtOF0tzcElfKxoIaaGiUNZcViGCxz26mLol2mglqqWuLJJNkP03u0dlpZgw87 kOkieOEBh7jzK4A6tWALKrFGXE9bILwMPP4GtEPf030MzMD/GK1KJZccUmjm7Ww8 lQOhvUzcAQu6bfPTbXLbqTw+FuaP1hG4cgKFSYjS73jAuo7zAjYk4Goxw7CuNw0Q WkFrc2OL8GRcM1aNJ1yKu1BjPlXjcA0pb/nKmTSvrAY2sPOPnhzDZP3C5pZkFjQg UfB6UhZ+tiQUJmh8rkkDH+EtdkxcvwtIDL/r/kDsnwmRz7+s4w7V1nDFKTCw== 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= 1745280397; x=1745366797; bh=2gqldzwEyu18awpS8PWU1G10qqSV6M8GqFS oxg6eWFs=; b=RQDdueAqhZljBWTXWvxD0GJvxU6zo5EPp83/UmkpP9Jcgnp7RGO gBNnM/tvQS2B4+aVESWtxHwOaKsEkPhpj23T25egKiWqHI7m3ZyRrMR4qnoTjqET H+1lUbEJdv4iU61E4HXpze2ib9s+I1Ztqupx/paYiiSZsTGATiDiaiMO7M1IGhne OsdCaOIj+H+bYeVshUgVZro+jcdMhTlclqhhAXt4IQmwucueqnFd6gaFoUbtUUKh 6AkyhYU17g9lJhyuhaTfiN+q2aGoJFDK7VWbjdQTMtwQbWUg97DQdBPOAcF/bzVy bR3S85D7l4mrsQIVNVuUPoxlGkVQR1k+VrA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvvdehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtoheprgdrkhhoiihhvghmhigrkhhinhesphhoshhtghhrvghsphhr ohdrrhhupdhrtghpthhtohepuggrnhhivghlsehmrghnihhtohhuqdhmrghilhdrohhrgh dprhgtphhtthhopegrnhhthhhonhhinhdrsghonhhnvghfohihsegurghtrgguohhghhhq rdgtohhmpdhrtghpthhtohepphhoshhtghhrvghssehjvghlthgvfhdrnhhlpdhrtghpth htohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Apr 2025 20:06:34 -0400 (EDT) Date: Tue, 22 Apr 2025 09:06:20 +0900 From: Michael Paquier To: "a.kozhemyakin" Cc: Daniel Verite , Anthonin Bonnefoy , Jelte Fennema-Nio , PostgreSQL Hackers Subject: Re: Add Pipelining support in psql Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="04fJb/GYJPuxdUHm" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --04fJb/GYJPuxdUHm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 21, 2025 at 03:22:28PM +0900, Michael Paquier wrote: > Anyway, I don't think that there is much we can do under a > PGRES_FATAL_ERROR in this code path when discarding the pipe results. > As far as I can tell, the server has failed the query suddenly and the > whole pipeline flow is borked. The best thing that I can think of is > to discard all the results while decrementing the counters, then let > psql complain about that like in the attached. I've added two tests > in TAP, as these trigger a FATAL in the backend so we cannot use the > normal SQL route, so as we have some coverage. >=20 > @Anthonin: Any thoughts or comments, perhaps? A second opinion would > be welcome here. While considering more ways to test this patch, I've recalled that injection points that issue a FATAL in the backend to emulate the original failure with more query patterns can provide more coverage, and the discard cleanup is showing stable enough as presented in the patch. I am wondering if we could not be smarter with the handling of the counters, but I really doubt that there is much more we can do under a PGRES_FATAL_ERROR. -- Michael --04fJb/GYJPuxdUHm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmgG3XwACgkQnvQgOdby QH1b2g//a4vZ7xg6pj2rJF91D/CkUsVN6yFPygCVm0U9d52c0tZYpgkxzb2NAxtr 3+6ve4oKYb01FdS7BS1vjhSI8fR/ep15x3xIa7o75XOJOHYjs9qY1xYjjwkfXILa oJnXtZ/UN/lmfxyftI7oOHw0d+g1GPMiQdT/0akSH0CPqPp/aTo8YANw+xvfWjay 5pNjy+U7Hcsxj7XW+Wen63OkpZa9L/YUSkIKDHjzjQYFawLoP2ySsPeoKP1Hl9re bl+0bzpHXE6zIsk3iO6pTa+xEzDgRwMOpJa2vDVULnNhly2uw0Xwe8v5FXKcuHl+ dRzrgR9csl6kuW6i8ODucaVVCMcV5yYbmim/pGXnGK15cmHyBETX6+2Z9Mftm24n JAdEgl/ID2A5GooH1aLdAhoewNdrWhFSG+kWiFGTrNXNRN3G7DyHAbdkSiBKckJ9 +Wn7RHdyQBUnH9dDsPW3MEjhLdtQ5M3pHxwpVns79Bm10lh3fFbWRY9t892gkNDY vwU3dO49VG+KUwzQ41ZQQYPmSydQV1K2Z/VJTQypIaOO2FEECt3vHmIWTa2vujwi WvsjHcD5TCNh2Rkl1ay2/KyxYq+bf8woR9krDerlVW9lYrzHkonmEhWa/1zlPV+K i6iq02sjNKD/RWDKs8gmU3V3YKnAStkF9T8YYbW/UdQ9+ayJqAQ= =5TRF -----END PGP SIGNATURE----- --04fJb/GYJPuxdUHm--