Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wgz4q-006X2e-1k for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:14:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgz4p-004ixw-1L for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:14:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wgz4p-004ixo-0R for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:14:39 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wgz4n-00000002BvO-02nD for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:14:38 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2228B7A0142; Tue, 7 Jul 2026 02:14:35 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 07 Jul 2026 02:14:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1783404874; x=1783491274; bh=ukMlUipZhg 4Q+XWjOEWMF2EXExi9KTuA7vi2LFOjToc=; b=G8tWPUyKN8hBW+FoHdUcyS4dlt cfek/7LlGA1Xt8jDXg6ZQXQfMcljkleEgoSA2jIf015tlEXEUpm5lQM0mKncFhkd Odp68O4h5JLQ0dJhqCeqVP+5YuoYoSYtz/o5LzAxq9YdOT+c3r5iLm+2cGJ/KVTH Ql+H9k986X8ia/PUE/XiEKgMNhJZNZJBNO5O18mOuK2V6OSYTEt8nwRGu8UE4ZMd U1mFUB+lxwVJDdXnhHMNcu5mBK0Sug3fudMnLeoHHi4mVADK4ZhT095r6fl3BlI/ fYkuFIXKy/95nvMHLXi5edZBId+6iA5hdGV6nxyIacoroM+uZAs3f6joD/0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1783404874; x=1783491274; bh=ukMlUipZhg4Q+XWjOEWMF2EXExi9KTuA7vi 2LFOjToc=; b=olUzZT3iEYHnNXbM5Fq62bTcPHzpWxnWnyROdY5eq56sT2AHUaR Xs4Wskvu6fcwjlRr+wzWtY3LXdSJgUBdIXFDOs9o8BvtjM+AfTfD8Wv6lEIN3hG3 LWRFJmHKdtCR3ROa/l7GNAO6DRrHApUTY7+951fg3XJs4oBWa+lJ2nscYfdP+Kyd TTnoQRPgGl/79tbubkt62Ess9pd9B+VGToeiY8w739L1TEdouH8xW/sbWJQpWgih 3vITL0pdyrOY+pI0rEm5wDDyBLe3oPBDqB34AbQE29MZ5EBn3dz5oqQIrVnaELGg Kgtc4K5A9/8AdMpwq3AxGJxZbptC5WArI8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF6+FgzUSimBCKcGXLT2al04loAVz1dqQMzud816Y0Wzp8Ixh17Vs59QxA4sNK2ic MG7AkVHU54b7ysDhE7kWQ8ERjWrkuQlP6QUM3niDIBL060HjSnQXrj6kv30QIqthaSGq8V ByYDz3zN5R+d7C/lFXqmTiONYT2bq01Lz0VGQ5MIQxpP0uzEGRIY6jfpGZOtMZw1TKiPe7 Mn201Yd/Ge32BSRsBWMJpUG+XeHvg+zUk4RAO9CqBk31rtOkCs1f0BRltqvSJeuYCwiJVS v1NY9aYMTpPaMqM/3EW3c8aIq2PjURldRzwE0wxjoVGFsRVbq9ap8hlnifwCOVmpDXy4Si Cp+wQVjj3wbT3rGHi9xMsUYlCtrg3eVykHtOLdDUZUkaNQqWpXHgpKUE+/JViBWzBzoc1s iHStDjkDXeg1KIcLyfIQe1lZdGPCuzIWaJU0vgGNTCJMIWhIeWWCaukAnpfhIDcfimmi6K bKn6ihPdFZzrcrYyI1BEe61QQ24vllPBquJj5+GiXGvA+Tr+c7IzRGZ3Np8V7YTvCAdNQn WvZZloG9d6yCLcFg1Uho5CAcVdSOhX9EjWos0G+HL2QWMJH/p7i6HZ/PINsgOi+u6l3twa tDGv3oTqtnuxOZi1oVgrlDzNyz/nbWK+0LVaOq3CABJXfojkoIdR8/mX3Jyg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 02:14:33 -0400 (EDT) Date: Tue, 7 Jul 2026 15:14:29 +0900 From: Michael Paquier To: Heikki Linnakangas Cc: Jelte Fennema-Nio , PostgreSQL Hackers , Alvaro Herrera , Jacob Champion Subject: Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore Message-ID: References: <88dfe280-ba29-4943-95b8-63abc9f3f771@iki.fi> <9d7ba3ac-d660-483e-8f68-9096a2464e90@iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IZJpVyRdjax4bd0H" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --IZJpVyRdjax4bd0H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 04, 2026 at 10:11:54PM +0300, Heikki Linnakangas wrote: > On 04/07/2026 01:28, Jelte Fennema-Nio wrote: >> 5d43c3c54 mentions the --single-step flag as something that required >> further analysis. I tried --single-step with and without this commit, >> and Ctrl+C behaves the same in both. I also cannot think of a reason why >> it would behave any differently. >=20 > Hmm, me neither. Michael, it was a long time ago, but would you happen to > remember what your concern on that was? I unfortunately do not have anymore my notes from 2019 lying around, but looking at the other thread and the code, it seems to me that the problem I saw back then is that cancel request was not working at all under --single-step because we would not set the flag when PQcancel() failed. Back around 5d43c3c54 the CancelRequest flag was only set after we've successfully sent a request. 92f33bb7afd3 has changed that globally, by setting the flag even if a cancel request could not be sent. So back then I am pretty sure that my line of thoughts turned around the case where PQcancel() failed. -- Michael --IZJpVyRdjax4bd0H Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpMmUUACgkQnvQgOdby QH0Xgg//ZxnTcMObq6sFwIwR0vr9k/J245r1QR5xTdIAKC2C8DJ4D/gJaGfI9CMN zACM7RSRyLVwQx7dmCa66iun4OplS+8meSs1auSclpFbdeTElxJGIaRNnC/hlFCM dQbxK0IZIQiIn3zdB+O5r24DGFsFxKc3A/kj1MQOjcuIGUti2h5igzvZUcw1D3/j hlzUQGaj9dEviUv8QZQ96KKC/iSf5gcq2WRe/HpSwtBLRpm3PIl8NuJ086eHXaQi 2h/U8w9hm69/rog3bCLeg5OeuqWPgZ4YGIG+gfUJSVADNZsZvGVsupFrAM+ScZyr LP/TVwXkrP5yHYmxN1EcKwQOLlHNlBqoFyuT0caqbCFO3TnQprCrZVSntXaSeKB+ zvMOlmW4Gpwvlps8IVcWhI+0CBcJkaR/1eC/mGSuuZcSiMailU8l1A6OXXmUtgbu HdBhhr63M1iNBGquchwcvfXkQgNbUsLlJM7+PkJiy8vkWvSQSQvVyJVO9otydErV U5+a1qhr8qFPzkisn2sFaEtEyPgEkqK/5tBXC/qjldE6SCWkJAoFhXMJyjLW3H/A 4CKwNrQEBFrV5IOy0yrMW/F53sSo8/3DCctXIbMt5/1HKutMuPSm5tPdvIOcKlaW k9stKAvhpgZge+nKhrbvUqnTrQyNGaoXOziRNX4q64DdlSSSBvM= =roeE -----END PGP SIGNATURE----- --IZJpVyRdjax4bd0H--