From: Tom Lane <tgl@sss.pgh.pa.us>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds
Date: Thu, 08 Feb 2024 12:04:24 -0500
Message-ID: <974582.1707411864@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPmGK15DF6EE7O6hTLbe5-fHvPDwEx9vm-BOCN3dsKOjZCo7bw@mail.gmail.com>
References: <17828-122da8cba23236be@postgresql.org>
<423731.1678381075@sss.pgh.pa.us>
<1adf8fee-5a9a-69c2-057a-87bbddebab9d@gmail.com>
<CAPmGK15anMZdx_nYx8mTY+t0dPJiL3QFot-S4sGm7EJT_WnmhQ@mail.gmail.com>
<CAPmGK15DF6EE7O6hTLbe5-fHvPDwEx9vm-BOCN3dsKOjZCo7bw@mail.gmail.com>
Etsuro Fujita <etsuro.fujita@gmail.com> writes:
> IIUC I think the assertion failure was caused by an
> error-during-error-recovery loop caused by the "epoll_create1 failed:
> Too many open files" error raised in WaitLatchOrSocket called from
> pgfdw_get_cleanup_result, which is called during abort cleanup. I
> think a simple fix to avoid such a loop is to modify the PG_CATCH
> block in pgfdw_get_cleanup_result so that it just ignores the passed
> error, not re-throwing it, and restores InterruptHoldoffCount and the
> memory context, like the attached. In the patch I also modified
> callers of pgfdw_get_cleanup_result to issue a warning when ignoring
> the error. I might be missing something, though.
I do not think ignoring the passed error is *ever* acceptable.
You have no idea what the error condition is or whether your
hack is sufficient to recover from it.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, etsuro.fujita@gmail.com, exclusion@gmail.com, 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: <974582.1707411864@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox