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 1rYGJz-00F5t2-1i for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Feb 2024 02:08:55 +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 1rYGJy-005AZN-0I for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Feb 2024 02:08:54 +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.94.2) (envelope-from ) id 1rYGJx-005AXa-ON for pgsql-bugs@lists.postgresql.org; Fri, 09 Feb 2024 02:08:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rYGJv-006Dzt-5S for pgsql-bugs@lists.postgresql.org; Fri, 09 Feb 2024 02:08:53 +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 41928k3O1291438; Thu, 8 Feb 2024 21:08:47 -0500 From: Tom Lane To: Andres Freund cc: Thomas Munro , Etsuro Fujita , Alexander Lakhin , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds In-reply-to: <20240209004005.xu3lxvackgccpglg@awork3.anarazel.de> References: <17828-122da8cba23236be@postgresql.org> <423731.1678381075@sss.pgh.pa.us> <1adf8fee-5a9a-69c2-057a-87bbddebab9d@gmail.com> <974582.1707411864@sss.pgh.pa.us> <20240208215920.myib264liwbkdndp@awork3.anarazel.de> <1273950.1707436232@sss.pgh.pa.us> <20240209000734.st2xwkfsrz7izbnx@awork3.anarazel.de> <1278317.1707438035@sss.pgh.pa.us> <20240209004005.xu3lxvackgccpglg@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 08 Feb 2024 16:40:05 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1291436.1707444526.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 08 Feb 2024 21:08:46 -0500 Message-ID: <1291437.1707444526@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > I agree that we can't just delay cleanup till, potentially, much later ,= but I > don't think that means that we have to wait 30s for each connection, > one-by-one. While that behavior is theoretically possible, I've heard no field complaints about it actually happening. I don't think we should move heaven and earth to prevent it, barring some evidence of it being a real-world issue. ISTM we do need to do something about this AcquireExternalFD failure though, because that's just self-inflicted damage. (And I think it's likely new since we invented WaitEventSets, though perhaps I'm wrong about that.) regards, tom lane