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 1lUfbX-0004JX-9e for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 01:06:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUfbV-0002S9-U8 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 01:06:33 +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 1lUfbV-0002PH-N5 for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 01:06:33 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUfbT-0002Qa-EH for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 01:06:32 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 82CF25C00B0; Thu, 8 Apr 2021 21:06:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 08 Apr 2021 21:06:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=8JX39gcD8dXak/vLeMyVf5SWVKi itg90eoRs+0Ta5pc=; b=aMnG/sVRcAnDqvfbWwC9+7uL5iez/JRHj6hkgMf6uiq 0U2KNGxOula6Cmq/xyQ+d+QDPrd7k2Au9LF+/5CYsMAFeciMs+ibAWKBRe20cRTe MRQvX+LKCeFG24Q3GZRtaOdSMXDizM0Proqeo0cJlP1CQFm9re6OwF+IRI+wQJpM sS7FLApH3SXQjpoJ185oYqcbeIEM8ygQgI12axCVOaEUkx5jXTTNrxAESFUfV5Yd cooM2M9DqqEg+Isq0eKA5lqPmeOG2W7jZzjzx1Q8gCd0jRbQs8VqIRcdF+/jME4D KxobVjciSflTHwskAwfgrH02XkgkHaAZmO3D7KAHP9Q== 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=fm2; bh=8JX39g cD8dXak/vLeMyVf5SWVKiitg90eoRs+0Ta5pc=; b=mw99TZx+nVCBu16St8CVho i+xOYICQ9Ix5NtRm/0OKjERMC2O/yAtP+uYdO0W9dFa7IrqlSZcZVi0VLuRfElRv Xs+bnSrspfffiR6qys27bu9HlSYbGG2p1JqpZL/ZWK/ATpBJfs7ousZodk231fYt 3CB340m00jnrgx/J7+u/aQ7l/vt8PrSt58ShzUXctUNnvMPvWh7zZxn1hKHZ3SYC O3rQZEst4PWGbyy45VZuAFzCFWLAvi6nMBdIdCXbAUeOuhbqypfjlaxyOWsyeEyK DmzEzRb76TQ2AQ0EzAS/+QX3aSBiMOOh2R1JpFWP/8r6Ip511xa9/7p6NMbDJM0Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudektddggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt jeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevfefgueegvdejfeejffekhfef teekledvgedvfeegfedujeeutdekheeigfelueenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BD82240057; Thu, 8 Apr 2021 21:06:28 -0400 (EDT) Date: Fri, 9 Apr 2021 10:06:24 +0900 From: Michael Paquier To: Julien Rouhaud Cc: Fabien COELHO , "shiy.fnst@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: psql - add SHOW_ALL_RESULTS option Message-ID: References: <1ec5ef49-b5c8-4129-e680-fe42f8d0670b@2ndquadrant.com> <20210408163050.fca7dwb37zszbsmm@nol> <20210408171135.ekhdf5nvqss554q3@nol> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DgP+wNUkk4QDkekQ" Content-Disposition: inline In-Reply-To: <20210408171135.ekhdf5nvqss554q3@nol> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --DgP+wNUkk4QDkekQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 09, 2021 at 01:11:35AM +0800, Julien Rouhaud wrote: > On Thu, Apr 08, 2021 at 07:04:01PM +0200, Fabien COELHO wrote: >> It is definitely a open item. I'm not sure where you want to add it=E2= =80=A6 >> possibly the "Pg 14 Open Items" wiki page? >=20 > Correct. I was running a long query this morning and wondered why the cancellation was suddenly broken. So I am not alone, and here you are with already a solution :) So, studying through 3a51306, this stuff has changed the query execution from a sync PQexec() to an async PQsendQuery(). And the proposed fix changes back to the behavior where the cancellation reset happens after getting a result, as there is no need to cancel anything. No strong objections from here if the consensus is to make SendQueryAndProcessResults() handle the cancel reset properly though I am not sure if this is the cleanest way to do things, but let's make at least the whole business consistent in the code for all those code paths. For example, PSQLexecWatch() does an extra ResetCancelConn() that would be useless once we are done with SendQueryAndProcessResults(). Also, I can see that SendQueryAndProcessResults() would not issue a cancel reset if the query fails, for \watch when cancel is pressed, and for \watch with COPY. So, my opinion here would be to keep ResetCancelConn() within PSQLexecWatch(), just add an extra one in SendQuery() to make all the three code paths printing results consistent, and leave SendQueryAndProcessResults() out of the cancellation logic. >> I tried but I do not have enough >> privileges, if you can do it please proceed. I added an entry in the nex= t CF >> in the bugfix section. >=20 > That's strange, I don't think you need special permission there. It's > working for me so I added an item with a link to the patch! As long as you have a community account, you should have the possibility to edit the page. So if you feel that any change is required, please feel free to do so, of course. -- Michael --DgP+wNUkk4QDkekQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBvqJAACgkQnvQgOdby QH0i7Q/+JBmwNT4JJNU2IyFeJi998UII6cpeoeWSMlcHFDtKZ9HlHfWeDRC7EZE0 HOyLiYmEC4rAFVDSFalP4L2g1xz5sGNuiznN1svaSEZBXXaxuAea065MQz0KMyJD G1zuwTyi7enjpPmioSY21TXeCAdv+zvGptucWcvRusC+iOJCVjpGIQaU+PF/A5ej xmVWsBnGEJw80T03Tz6zO3zQPwhsmCpedRJltNtMs/RJWJ9O4cD4C6xFolfuaUb/ AypsooksD8eWkenC802QVpbg/iM2+66UcB4v4ucM7cvavRV4tyiXPdUgQkG97xax Ldz/w6E8KSEf3W8gXqsFug6vsFAj0uoZlMTWKc5MoJ6CYWYGruPcg1Nku7LhCO3N tGRDoOehQLlHClSp+7GNTXQp7Pr/FppOY+J6CTv17of7bIRKH2HuthPrCMT1v9cc mQGFtt8gt/ZobPGsEUmO+7oa08i0lO1Hw/9LYehu09iqsExbYXx2mBMZ5rxwUfjS dnL4WxtRx29D3YLi1jo5TbzmCAFEJ3KwMLTkcu+n2gwWYf1cgk0P5//4bIpvb4zE MTGBRpESykHiepAymoaA3DzbuxzC2vgP0NUFlpMIKxMjdxNAGUe4dRr1SK3kVPtn i5Tky36t6cMeb6HPtBTb5fyWmVpbsBdPqua0sBpv+gpe+SudpwQ= =UOUU -----END PGP SIGNATURE----- --DgP+wNUkk4QDkekQ--