Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds - Mailing list pgsql-bugs

From Etsuro Fujita
Subject Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds
Date
Msg-id CAPmGK15f1P6pn5pSxsTspvm4RhHNTeecAXNOa+N0hH7jrHYdjw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,

On Fri, Feb 9, 2024 at 11:08 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.)

+1; but my concern is that even if we fix that failure, it is still
possible that WaitLatchOrSocket in pgfdw_get_cleanup_result throws an
error, causing the same error-during-error-recovery loop.  (For
example, epoll_create1() can fail in CreateWaitEventSet in the
WaitLatchOrSocket after reserving an external FD, leading to an
error.)

Best regards,
Etsuro Fujita



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds
Next
From: Thomas Munro
Date:
Subject: Re: BUG #18334: Segfault when running a query with parallel workers