Re: Another WaitEventSet resource leakage in back branches - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Another WaitEventSet resource leakage in back branches
Date
Msg-id 20240411162946.6qnlzimjarkeo2su@awork3.anarazel.de
Whole thread Raw
In response to Another WaitEventSet resource leakage in back branches  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Responses Re: Another WaitEventSet resource leakage in back branches
List pgsql-hackers
Hi,

On 2024-03-22 21:15:45 +0900, Etsuro Fujita wrote:
> While working on [1], I noticed $SUBJECT: WaitLatchOrSocket in back
> branches is ignoring the possibility of failing partway through, too.
> I added a PG_FAINALLY block to that function, like commit 555276f85.
> Patch attached.

Could you expand a bit on the concrete scenario you're worried about here?
PG_TRY/CATCH aren't free, so adding something like this to a quite common
path, in the back branches, without a concrete analysis as to why it's needed,
seems a bit scary.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Table AM Interface Enhancements
Next
From: Nathan Bossart
Date:
Subject: Re: SET ROLE documentation improvement