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 1o0lQd-00013q-Hl for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jun 2022 14:52:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o0lQc-0004b0-3o for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jun 2022 14:52:30 +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 1o0lQb-0004ao-Rn for pgsql-bugs@lists.postgresql.org; Mon, 13 Jun 2022 14:52:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0lQZ-00036E-I5 for pgsql-bugs@lists.postgresql.org; Mon, 13 Jun 2022 14:52:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 25DEqGOR3791930; Mon, 13 Jun 2022 10:52:16 -0400 From: Tom Lane To: Kyotaro Horiguchi cc: michael@paquier.xyz, robertmhaas@gmail.com, 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 In-reply-to: <20220613.160701.975499861789120736.horikyota.ntt@gmail.com> References: <2649417.1654875709@sss.pgh.pa.us> <2656555.1654877531@sss.pgh.pa.us> <20220613.160701.975499861789120736.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Mon, 13 Jun 2022 16:07:01 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3791928.1655131936.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 13 Jun 2022 10:52:16 -0400 Message-ID: <3791929.1655131936@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > At Mon, 13 Jun 2022 15:45:05 +0900, Michael Paquier wrote in = >> This suggestion does not look right to me with --single-transaction. >> If not using ON_ERROR_STOP, I think that we should still loop through >> all the switches given by the caller and force a COMMIT all the time >> because the intention is that we don't care about failures while >> processing. This gives me the attached as a result for HEAD, where we > Agreed. It is actually a bug that on_error_stop is ignored here. Sounds plausible to me too. >> Now, do we really want to introduce this new behavior on HEAD? We are >> post-beta so this does not me make me really comfortable if both >> Robert and you don't like the change, even if the behavior of >> --single-transaction/ON_ERROR_STOP on client-side failure is weird to >> me and others from upthread. I think it's fine to commit this to HEAD. The reason for reverting in the back branches was exactly that we'd already changed the behavior; and what we now see is that it's still buggy and we need to change it some more. That's an entirely appropriate thing to be doing in beta. regards, tom lane