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