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 CAPmGK15anMZdx_nYx8mTY+t0dPJiL3QFot-S4sGm7EJT_WnmhQ@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  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: BUG #17828: postgres_fdw leaks file descriptors on error and aborts aborted transaction in lack of fds  (Etsuro Fujita <etsuro.fujita@gmail.com>)
List pgsql-bugs
On Fri, Nov 24, 2023 at 1:00 PM Alexander Lakhin <exclusion@gmail.com> wrote:
> 09.03.2023 19:57, Tom Lane wrote:
> > PG Bug reporting form <noreply@postgresql.org> writes:
> >> The following script:
> >> [ leaks a file descriptor per error ]
> > Yeah, at least on platforms where WaitEventSets own kernel file
> > descriptors.  I don't think it's postgres_fdw's fault though,
> > but that of ExecAppendAsyncEventWait, which is ignoring the
> > possibility of failing partway through.  It looks like it'd be
> > sufficient to add a PG_CATCH or PG_FINALLY block there to make
> > sure the WaitEventSet is disposed of properly --- fortunately,
> > it doesn't need to have any longer lifespan than that one
> > function.
>
> Now that the leakage eliminated by 50c67c201/481d7d1c0 we still can observe
> the assert-triggering half of the bug with something like that:

Will look into this.  Thanks for the report!

My apologies for my very late response to this thread.  I overlooked
it completely.  :(

Best regards,
Etsuro Fujita



pgsql-bugs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows
Next
From: vignesh C
Date:
Subject: Re: [16+] subscription can end up in inconsistent state