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 1tEHgI-006XXK-1v for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Nov 2024 00:37:54 +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 1tEHgG-003JSZ-JD for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Nov 2024 00:37:52 +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 1tEHgG-003JPD-8u for pgsql-hackers@lists.postgresql.org; Fri, 22 Nov 2024 00:37:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tEHgD-0038Po-RS for pgsql-hackers@lists.postgresql.org; Fri, 22 Nov 2024 00:37:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4AM0bYLf480239; Thu, 21 Nov 2024 19:37:36 -0500 From: Tom Lane To: Jelte Fennema-Nio cc: Alexander Lakhin , Andres Freund , Alvaro Herrera , Noah Misch , Jacob Champion , Denis Laxalde , vignesh C , Thomas Munro , Greg Stark , "Gregory Stark (as CFM)" , Daniel Gustafsson , Peter Eisentraut , Justin Pryzby , Robert Haas , PostgreSQL Hackers , Etsuro Fujita Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel In-reply-to: References: <202407221126.vyw5q3h4nyoh@alvherre.pgsql> <5ea25e4d-1ee2-b9bf-7806-119ffa658826@gmail.com> <578934.1725045685@sss.pgh.pa.us> <584811.1725048717@sss.pgh.pa.us> <591893.1725051309@sss.pgh.pa.us> <37c3bd11-7321-fe58-99ca-bc15a67c08cc@gmail.com> <2947163.1731810791@sss.pgh.pa.us> <8f280cbd-8450-87ea-f0f7-ab4932af5750@gmail.com> <321476.1732152654@sss.pgh.pa.us> Comments: In-reply-to Jelte Fennema-Nio message dated "Thu, 21 Nov 2024 22:33:06 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <480237.1732235854.1@sss.pgh.pa.us> Date: Thu, 21 Nov 2024 19:37:34 -0500 Message-ID: <480238.1732235854@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jelte Fennema-Nio writes: > On Thu, 21 Nov 2024 at 02:31, Tom Lane wrote: >> This seems to fix the problem here. Thoughts? > Overall, a good approach to fix issue number 1. I think it would be > best if this was integrated into libpqsrv_cancel instead though. That > way the dblink would benefit from it too. How would we do that? libpqsrv_cancel is not chartered to wait around for the results of the cancel, and I'm not even sure that it could know what to check for. (I did get the impression that all this code was not very well factored, but I'm not volunteering to rewrite it wholesale.) > nit: Maybe call it RETRY_CANCEL_TIME. Sure. regards, tom lane