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 1lUvUW-0006Ve-2t for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 18:04:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUvUR-0004Qa-Vy for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 18:04:19 +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 1lUvUR-0004No-Oh for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 18:04:19 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUvUM-00039Z-GD for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 18:04:18 +0000 Received: from pseudo (185.141.6.84.rev.sfr.net [84.6.141.185]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id 92DDAC0289; Fri, 9 Apr 2021 20:05:45 +0200 (CEST) Date: Fri, 9 Apr 2021 20:04:11 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Michael Paquier cc: Julien Rouhaud , "shiy.fnst@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: psql - add SHOW_ALL_RESULTS option In-Reply-To: Message-ID: References: <1ec5ef49-b5c8-4129-e680-fe42f8d0670b@2ndquadrant.com> <20210408163050.fca7dwb37zszbsmm@nol> <20210408171135.ekhdf5nvqss554q3@nol> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2056645051-274101562-1617991451=:3439700" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2056645051-274101562-1617991451=:3439700 Content-Type: text/plain; format=flowed; charset=UTF-8 Content-Transfer-Encoding: 8BIT >> Yep, it looks much better. I found it strange that the later did a reset but >> was not doing the set. >> >> Attached v2 does as you suggest. > > Close enough. I was thinking about this position of the attached, > which is more consistent with the rest. Given the structural complexity of the function, the end of the file seemed like a good place to have an all-path-guaranteed reset. I find it a little bit strange to have the Set at the upper level and the Reset in many… but not all branches, though. For instance the on_error_rollback_savepoint/svptcmd branch includes a reset long after many other conditional resets, I cannot guess whether the initial set is still active or has been long wiped out and this query is just not cancellable. Also, ISTM that in the worst case a cancellation request is sent to a server which is idle, in which case it will be ignored, so the code should be in no hurry to clean it, at least not at the price of code clarity. Anyway, the place you suggest seems ok. -- Fabien. --2056645051-274101562-1617991451=:3439700--