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 1sk8eT-0082fq-Vy for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 20:55:26 +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 1sk8eR-00Av1x-T2 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 20:55:24 +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 1sk8eR-00Av1m-Ja for pgsql-hackers@lists.postgresql.org; Fri, 30 Aug 2024 20:55:24 +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 1sk8eP-002EOC-Ow for pgsql-hackers@lists.postgresql.org; Fri, 30 Aug 2024 20:55:22 +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 47UKt9Qg591894; Fri, 30 Aug 2024 16:55:10 -0400 From: Tom Lane To: Jelte Fennema-Nio cc: Alexander Lakhin , Alvaro Herrera , Noah Misch , Jacob Champion , Denis Laxalde , vignesh C , Thomas Munro , Greg Stark , "Gregory Stark (as CFM)" , Jelte Fennema , Daniel Gustafsson , Peter Eisentraut , Andres Freund , Justin Pryzby , Robert Haas , PostgreSQL Hackers , Etsuro Fujita Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel In-reply-to: <584811.1725048717@sss.pgh.pa.us> References: <202407221126.vyw5q3h4nyoh@alvherre.pgsql> <5ea25e4d-1ee2-b9bf-7806-119ffa658826@gmail.com> <578934.1725045685@sss.pgh.pa.us> <584811.1725048717@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 30 Aug 2024 16:11:57 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <591892.1725051309.1@sss.pgh.pa.us> Date: Fri, 30 Aug 2024 16:55:09 -0400 Message-ID: <591893.1725051309@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Hmm. I'm not convinced that 0001 is an actual *fix*, but it should > at least reduce the frequency of occurrence a lot, which'd help. After enabling log_statement = all to verify what commands are being sent to the remote, I realized that there's a third thing this patch can do to stabilize matters: issue a regular remote query inside the test transaction, before we enable the timeout. This will ensure that we've dealt with configure_remote_session() and started a remote transaction, so that there aren't extra round trips happening for that while the clock is running. Pushed with that addition and some comment-tweaking. We'll see whether that actually makes things more stable, but I don't think it could make it worse. regards, tom lane