Re: Another WaitEventSet resource leakage in back branches

From: Andres Freund <andres(at)anarazel(dot)de>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Another WaitEventSet resource leakage in back branches
Date: 2024-04-11 16:29:46
Message-ID: 20240411162946.6qnlzimjarkeo2su@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-04-11 16:48:30 Re: SET ROLE documentation improvement
Previous Message Melanie Plageman 2024-04-11 16:19:09 Re: Table AM Interface Enhancements