Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny2Hf-0004VJ-Ku for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 02:16:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ny2He-0000Sd-2c for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 02:15:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny2Hc-0000ST-Gy for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 02:15:57 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny2HV-0001wa-ME for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 02:15:55 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9DF4D5C00E5; Sun, 5 Jun 2022 22:15:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 05 Jun 2022 22:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1654481748; x=1654568148; bh=zQnprme9FQ 0FkBiHEuqS5fWA3Xf9bNCYGH8czR2mpts=; b=Odo5MWB8cWGPlt80yrPWwSnA0t 1xVjTx8k2cBsemn4tMhW3np5TwU6o6a8WMoj4NqfrRNQep8s0/KxGuSQnp0mDaK6 MQQJf9hfTI4T7GyClrm1Ug/OcYwi46KBgOln+KoixWrswv2/wbGyJK2Awn2OdyHO ugV3sgD1opC83mFe+8cBI6Yfo5tCwAogu4pVQyRCUHb+XaPwVeHm9bldxUWbn3ZC tdHWm92fmyRJALLuVBHK9T3z9fAkQViX8nUTwzr1+3Gea/vVA7Mur0WEACHeVKLs pR2sR9GP/7Llv6iojgzMpYlvFfY0h5VKOW5rqr6chpqD380Na4/I7NleLObw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1654481748; x=1654568148; bh=zQnprme9FQ0FkBiHEuqS5fWA3Xf9 bNCYGH8czR2mpts=; b=F9+yzS1oJAmrtj0+v1w/qpuTuf/Lrj0PP0nX0Re+DjWb Tm/kWR+HonpzUcYyg1arOP3sz9YlwtEdSCux3G6SwmlUFpUzaY+RJnnmwTLmHcaP gzfkVoUSlHzjtAUJcXH20N/RwfZn/RzaDDqikcbGer532XvC/FNRx1A9l4P4kuRA 05IvsGO8/4ZwdLrhCjAfGUiA1COVxlkzUb/KdncvPzDY8rUFksN0ksYyv+B2r3fH EvMj+UFHRcWZbHYhXnb17KevCQ9eCLh1kvLbt9Fm4pjP8aE7Xfa1JwZwx775Wans 89q9Ka/w6mp1LDd4LBixEf+NfctdHvJOUnM8UOjh6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtuddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 5 Jun 2022 22:15:47 -0400 (EDT) Date: Mon, 6 Jun 2022 11:15:44 +0900 From: Michael Paquier To: Kyotaro Horiguchi Cc: christoph.berg@credativ.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error Message-ID: References: <20220531.113927.640026319524742851.horikyota.ntt@gmail.com> <20220603.175603.682874096867945240.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0foBS80S/QYIPew3" Content-Disposition: inline In-Reply-To: <20220603.175603.682874096867945240.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0foBS80S/QYIPew3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 03, 2022 at 05:56:03PM +0900, Kyotaro Horiguchi wrote: > At Thu, 2 Jun 2022 14:39:41 +0900, Michael Paquier = wrote in=20 >> 001_basic.pl, but we also need to be careful when sending down queries >> with psql expected to fail because of SIGPIPE (c757a3d, 6d41dd0). The >=20 > This does not need to send a byte after the client-side failure. The > connection is rather living after failure in this case. Sure, but I don't think that we can reliably test the case where one of the switches triggers a backend-side error, which is what my point is about. I have added a note about that, with a couple of extra tests with -f, with both success and failure scenarios. And we'd better add -X to all the commands as well. These are added only on HEAD as the test file is rather new. >> It causes psql to issue a BEGIN command before the first such option >> and a COMMIT command after the last one, thereby wrapping all the >> commands into a single transaction. >> If any of the commands fails, a ROLLBACK command is sent instead. >> This ensures that either all the commands complete successfully, or >> no changes are applied. Looks fine to me, so applied down to 10. -- Michael --0foBS80S/QYIPew3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmKdY08ACgkQnvQgOdby QH2t+w//dtrJPgyhwde36JKZaK/0hQvOYyqPLaorWwTTZIo3QiJz8Lp/ba2CFbuV eogv8iE6PpDGQ/i/3tDtAhDO6t/h9/Oyb0VqbJvgqnniD4NpJhnidNnLbPLXuBns MiMa1HV5/Zv9LArp+jOL4ZCxGWsAqVcNJ10a2Gkda3L0Ha+ZZN9lCfC5GxmLmqTs 3oa3RXK3eo5kKeg4Tg+01apzd6NGhnmQESxNDLNj1zPLijCJRMWu2tSMTOhKtqt3 xYeLvgyBg8Kn7jFn+dhVxmtw+IENAmmw9oU819/EtyFSgWD8dnncx58hz+TLC/l/ UmJfTQhnOTbYVzb5n3L/56nfg/NRrD7f0I8i21cTL+V7NMUENAD8t+r/yg3Fe4Fv 6eYIyUQk0eMv5tCvLsOrQ/BfX0HFExt/W+WR5ozwaUMEEVgjBL6o+Og4LNFlxbsc EYHScZQ/ojhFGkIDFzWTfDgqriIBFnR96Y22N99um1StcFXHg4eMVeVHUYgF9Kj9 Rh5lW3smP1fNQ3VemAG6cV9Ar8OIdRrbFTtPzRbOUPXFS/1cHvYhkygCWor/sAI6 cD0Ec+UGmRUONX4uvP3bvhQsOPgMgr22gMjy+pjl8bIckjawnwO3YpZjK3j9+3wM PfpihA5cj55FLJnoAR8KNny/nA/oUNFG4ig+wL9v6bFv491r1Ks= =Cyfk -----END PGP SIGNATURE----- --0foBS80S/QYIPew3--