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 1ny5xh-0001BA-Oe for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 06:11: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 1ny5xg-0007fw-FR for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 06:11:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny5xg-0007fn-57 for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 06:11:36 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ny5xZ-0003Ud-TJ for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 06:11:35 +0000 Received: by mail-pj1-x102c.google.com with SMTP id e9so1466952pju.5 for ; Sun, 05 Jun 2022 23:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=q3qgPIgE+XtlO57IKuersmJkHESII45mFP7VHJS2+QY=; b=Wsib9GhkVc2qo7ykLbuxEyoEsE9qotuMTNhCyUgMbF6PfkMa+iRVkFN15kFMM/Xgfv lp9CZVcQo7QfDzna6JX70HoBX9jVERea4xiA4+rlOXMBq2Z+txEgmss1Yt7tbFEelBnt Lx93eGlXuhRHFzBtQNVBfC/pl8d3sGRU1w9xP5drK3C2v9usO24FJGxTeQQRDwsZiiTo QpA9fRMGi7nl2v0feDeZr8LT76+Nj2BBXKDyxQ8IOIsURAgEW5AjJ0QbTPhEHOTyJG2H M9wv9TQHBoL6973B8bp9aeDLvDO75djAw/EDUFuuQBJfSiepfkFjXKD5ez1p/gofu7FD o63g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=q3qgPIgE+XtlO57IKuersmJkHESII45mFP7VHJS2+QY=; b=ljyuNlv7mGvovIL2tayU9ociCh3nxYnOaPhfcH4lhcBD+rpk0a380NsgTZQO9eXhQZ yj8AQaN0SwrQ1XYNq1QxWmKZ95H5+y29j0kXw7B8YY2tiUJvdVakICIIEbmJIhL6Evu9 3Y7M3vwMlqsvS8F2wqy0q1hU5Pwf2ElnnV0n2qrNKtV8gLeENPtRxW1q56oQj15WKFZ2 kLXa/aN8tuxrYTHigLtyp/e3heXnLn+HYamJ+iRcIPPqQkZ7XKDfJgPJjZw7yyIIB9Go yc0eYZvfGgzT0xUukNlkSU0nyhXzC5K9ISqFyU5/hUHNg7L2unlN/zs70SOLgrl6HVai osmg== X-Gm-Message-State: AOAM531DfZXRposPcOr9tobLtlEsiqfOdlGGnAKOcr7peZNtIRuIF6oa miSiKu8SnoV0/BLPBaM8gcw= X-Google-Smtp-Source: ABdhPJyiexQ0POH0+Xke7AoL/n7bIGbiOFSAPYO7uAEILJrujlZTEpBjiUIWqnJjcqvbDnUjyBAeqA== X-Received: by 2002:a17:90a:5ae1:b0:1db:d0a4:30a4 with SMTP id n88-20020a17090a5ae100b001dbd0a430a4mr24876955pji.128.1654495887655; Sun, 05 Jun 2022 23:11:27 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id v12-20020a170902b7cc00b00163f2fe1e64sm9645397plz.255.2022.06.05.23.11.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 05 Jun 2022 23:11:26 -0700 (PDT) Date: Mon, 06 Jun 2022 15:11:24 +0900 (JST) Message-Id: <20220606.151124.656806001979080471.horikyota.ntt@gmail.com> To: michael@paquier.xyz 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 From: Kyotaro Horiguchi In-Reply-To: References: <20220603.175603.682874096867945240.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Mon, 6 Jun 2022 11:15:44 +0900, Michael Paquier wrote in > 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 > >> 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 > > > > 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. Mmm, sorry about my laziness, and thanks for improving the coverage. > >> 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. (Yes!) regards. -- Kyotaro Horiguchi NTT Open Source Software Center