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 1mTkXP-0005EN-FN for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Sep 2021 12:42:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mTkXO-0006zr-9b for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Sep 2021 12:42:46 +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 1mTkXN-0006zf-Dt for pgsql-hackers@lists.postgresql.org; Fri, 24 Sep 2021 12:42:46 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTkXH-0000V9-Mx for pgsql-hackers@lists.postgresql.org; Fri, 24 Sep 2021 12:42:44 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6F05E3200495; Fri, 24 Sep 2021 08:42:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 24 Sep 2021 08:42:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=L2tbBh xdMawSuZMSn6xru2sDiAfnCicMMjnWoxVAE40=; b=AU4afs1OWk1uU4mL+5yLPV 02BipUYg+E1aUxwY9TGAnhGP4DleQuhUqBOpw8KNxPfMQ3h+iycLhGARtSIGmNSA vjCR8l3R48M5jDb183+40RFEzF3C/smt0EeDM5Ap4mNdNjrXTRiU4TmRNPtnWr/P LIkxQ4k3s9Lxe8u9x1lEcQau1y4IYJY+KsKx+hAkEFxt1fs1hjjWRvxQ7TqXM5K5 B6yFIUYHxRvuSh1CusD2VfRVC0ahpgf3Nc1tpWjU/n9tNXbQllsUXHqBI9rgys6Q uqiC5BzAiaelYC81T4YMilB7RX8tXeUrIodtl3AZnppd0gygTPdrhBgfxB+uqMRA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejuddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtsehmtderredtfeehnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeevfedtvddugfeuhffhteev leffgefhueeigfeiiedtleeitdfgfeejgedtgfetjeenucffohhmrghinhepphhoshhtgh hrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusg drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Sep 2021 08:42:34 -0400 (EDT) Subject: Re: psql - add SHOW_ALL_RESULTS option To: Fabien COELHO Cc: "pgsql-hackers@lists.postgresql.org" References: <69C0B369-570C-4524-8EE4-BCCACECB6BEE@amazon.com> <20210412193301.GA11204@alvherre.pgsql> <3738387.1618451507@sss.pgh.pa.us> <451a2111-3757-c511-9413-8f8af531a167@enterprisedb.com> <18c78a01-4a34-9dd4-f78b-6860f1420c8e@enterprisedb.com> From: Peter Eisentraut Message-ID: <6954328d-96f2-77f7-735f-7ce493a40949@enterprisedb.com> Date: Fri, 24 Sep 2021 14:42:33 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------66AEBF40A0BC935DAADB3134" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------66AEBF40A0BC935DAADB3134 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 22.07.21 16:58, Fabien COELHO wrote: >>> Ok. I noticed. The patch got significantly broken by the watch pager >>> commit. I also have to enhance the added tests (per Peter request). >> >> I wrote a test to check psql query cancel support.  I checked that it >> fails against the patch that was reverted.  Maybe this is useful. > > Here is the updated version (v8? I'm not sure what the right count is), > which works for me and for "make check", including some tests added for > uncovered paths. I was looking at adding test coverage for the issue complained about in [0]. That message said that the autocommit logic was broken, but actually the issue was with the ON_ERROR_ROLLBACK logic. However, it turned out that neither feature had any test coverage, and they are easily testable using the pg_regress setup, so I wrote tests for both and another little thing I found nearby. It turns out that your v8 patch still has the issue complained about in [0]. The issue is that after COMMIT AND CHAIN, the internal savepoint is gone, but the patched psql still thinks it should be there and tries to release it, which leads to errors. [0]: https://www.postgresql.org/message-id/2671235.1618154047@sss.pgh.pa.us --------------66AEBF40A0BC935DAADB3134 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="0001-psql-Add-various-tests.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-psql-Add-various-tests.patch"