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 1o8NDh-0001GN-K0 for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jul 2022 14:38:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8NDf-0004jH-GD for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jul 2022 14:38:35 +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 1o8NDf-0004hl-6s for pgsql-bugs@lists.postgresql.org; Mon, 04 Jul 2022 14:38:35 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8NDZ-0004Us-QM for pgsql-bugs@lists.postgresql.org; Mon, 04 Jul 2022 14:38:34 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4Lc7hg0xTGz3Dyq; Mon, 4 Jul 2022 16:38:27 +0200 (CEST) Date: Mon, 4 Jul 2022 16:38:26 +0200 From: Christoph Berg To: Michael Paquier Cc: Tom Lane , Kyotaro Horiguchi , robertmhaas@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error Message-ID: Mail-Followup-To: Christoph Berg , Michael Paquier , Tom Lane , Kyotaro Horiguchi , robertmhaas@gmail.com, pgsql-bugs@lists.postgresql.org References: <2649417.1654875709@sss.pgh.pa.us> <2656555.1654877531@sss.pgh.pa.us> <20220613.160701.975499861789120736.horikyota.ntt@gmail.com> <3791929.1655131936@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Michael Paquier > On Tue, Jun 14, 2022 at 10:31:21AM +0900, Michael Paquier wrote: > > Okay, let's do so then on HEAD. I'll wait a bit more, in case others > > have an opinion to offer on the matter. > > Well, done. One thing that I find a bit surprising in all that is the > lack of consistency in the handling of the return code of psql when > the last switch fails when not using ON_ERROR_STOP. For example, psql > fails if the last switch is a slash command from -c, but succeeds if > the last switch is a slash command in a file from -f that exists. > This comes down to the way failures are passed down from MainLoop() so > I am not sure if this is worth worrying about and nobody has > complained about that AFAIK, but I have added some extra tests to at > least document everything I could think about to track changes, in > case somebody plays with this code in the future. Is there anything left to do to fix up the --single_transaction + ON_ERROR_STOP case here? From reading the code, it now does what it should do. What is left to do for backpatching it? Christoph