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 1rYCXm-00Epsn-PN for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Feb 2024 22:06: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 1rYCXl-003in6-OH for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Feb 2024 22:06:53 +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 1rYCXl-003imy-G3 for pgsql-bugs@lists.postgresql.org; Thu, 08 Feb 2024 22:06: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 1rYCXi-006CBE-W7 for pgsql-bugs@lists.postgresql.org; Thu, 08 Feb 2024 22:06:52 +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 418M6ko11258576; Thu, 8 Feb 2024 17:06:46 -0500 From: Tom Lane To: Andres Freund cc: 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: <20240208215920.myib264liwbkdndp@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> Comments: In-reply-to Andres Freund message dated "Thu, 08 Feb 2024 13:59:20 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1258574.1707430006.1@sss.pgh.pa.us> Date: Thu, 08 Feb 2024 17:06:46 -0500 Message-ID: <1258575.1707430006@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > I also wonder if postgres_fdw should strive to use a longer lived wait event > set. For efficiency, if nothing else? That'd avoid the need to create one > during error handling. Seems like a plausible idea. Having to acquire resources to clean up an error is an anti-pattern for sure. regards, tom lane