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.94.2) (envelope-from ) id 1rk5RK-00AD3P-BF for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Mar 2024 16:57:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rk5RI-00GMrN-7F for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Mar 2024 16:57:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rk5RH-00GMrF-SL for pgsql-hackers@lists.postgresql.org; Tue, 12 Mar 2024 16:57:20 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rk5RE-0049OC-6y for pgsql-hackers@lists.postgresql.org; Tue, 12 Mar 2024 16:57:19 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6568D5C0083; Tue, 12 Mar 2024 12:57:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 12 Mar 2024 12:57:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710262635; x= 1710349035; bh=AVY2Za1eGTE38XKdrPIq2kAT3VlOo7dJ/qHpKS17B+E=; b=f lEs0xoeHhIkfMNYZx+A+BSQGjR8PTYWMXlHPGiCTar2Q9nGhbB+drj0IhpRKqZMU 3QEq5awprNJHJLEiWCb4Lfhv4eApqQfQiMqIJFPIfGzFPzMB/zBHY3F07HsTRHUp pLobqbnQf8zx/nHdNwoTrrMU6Mi5tbQZSRDQT2Y8geRUT2U9Yf5wLjkfi0Sm0jno JfCwgxeS/JPJmFu/6WIieMlHBTjfJtz6wUyWhjO3sqUXwY9EG3B02P9qos7w4Nbu FP1YB/0RRVz+QleRwjYPpS9rlh3yFdacV7CYgh4IlRHi/s57Fcqi/b99lZNnDdP0 HH7yStagCPbp9dl5e344g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeefgdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Mar 2024 12:57:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1710262248; bh=WpzfVJxKqX9R3HeIENaDORn0Vvq57oPzmhMF2M8itL0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=gff6k9kaxlCD4bFO685UUdj3jx2kFTUEWQZ4yEqHfJrEEXwK5GpGiC59COY9delhd KsuLjttTTqknykV2gvpUYeMbj2jOLr4rlOWzVpaKdBfvOknJX7un0NCV1IxsXFbfmv eG54pxdHxyPB392VbgyS0o3wGqm1h1nk/w4eAimba8ta7Se6dO6GFnivbgo2J3Jz19 IE17N33n6V/VzqNRtkrWf2ZM3s4H+tTKFe3VswyybVActTBK7s1K/bCwDPJrGRJMW8 S/PKFzel8mdofG75WsiYc3dvv5UY9YyDep+MUSj8SlPqEUBGWPJvr8oWEkKIxed8YW eefJpoCKQX1EA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id DA3BFCD5; Tue, 12 Mar 2024 17:50:48 +0100 (CET) Date: Tue, 12 Mar 2024 17:50:48 +0100 From: Alvaro Herrera To: Jelte Fennema-Nio Cc: Denis Laxalde , vignesh C , Thomas Munro , Greg Stark , Tom Lane , "Gregory Stark (as CFM)" , Jelte Fennema , Daniel Gustafsson , Peter Eisentraut , Andres Freund , Justin Pryzby , Robert Haas , "pgsql-hackers@lists.postgresql.org" Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel Message-ID: <202403121650.mpyd5m4y4udb@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Mar-12, Jelte Fennema-Nio wrote: > On Tue, 12 Mar 2024 at 10:19, Alvaro Herrera wrote: > > Here's a last one for the cfbot. > > Thanks for committing the first 3 patches btw. Attached a tiny change > to 0001, which adds "(backing struct for PGcancelConn)" to the comment > on pg_cancel_conn. Thanks, I included it. I hope there were no other changes, because I didn't verify :-) but if there were, please let me know to incorporate them. I made a number of other small changes, mostly to the documentation, nothing fundamental. (Someday we should stop using to document the libpq functions and use refentry's instead ... it'd be useful to have manpages for these functions.) One thing I don't like very much is release_conn_addrinfo(), which is called conditionally in two places but unconditionally in other places. Maybe it'd make more sense to put this conditionality inside the function itself, possibly with a "bool force" flag to suppress that in the cases where it is not desired. In pqConnectDBComplete, we cast the PGconn * to PGcancelConn * in order to call PQcancelPoll, which is a bit abusive, but I don't know how to do better. Maybe we just accept this ... but if PQcancelStart is the only way to have pqConnectDBStart called from a cancel connection, maybe it'd be saner to duplicate pqConnectDBStart for cancel conns. Thanks! -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/