Re: HOLD_INTERRUPTS() vs ProcSignalBarrier - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: HOLD_INTERRUPTS() vs ProcSignalBarrier
Date
Msg-id CA+hUKGJevy55xyen0xeMMD1=uGXPSpnUBu3=MR7AOky_QF36Sg@mail.gmail.com
Whole thread Raw
In response to Re: HOLD_INTERRUPTS() vs ProcSignalBarrier  (Andres Freund <andres@anarazel.de>)
Responses Re: HOLD_INTERRUPTS() vs ProcSignalBarrier
List pgsql-hackers
On Wed, May 25, 2022 at 3:08 PM Andres Freund <andres@anarazel.de> wrote:
> On 2022-05-25 14:47:41 +1200, Thomas Munro wrote:
> > My question is: do we really need to suppress these non-ereporting
> > interrupts in all the places we currently do HOLD_INTERRUPTS()?
>
> Most of those should be fairly short / only block on lwlocks, small amounts of
> IO. I'm not sure how much of an issue this is. Are there actually CFIs inside
> those HOLD_INTERRUPT sections?

The concrete example I have in mind is the one created by me in
637668fb.  That can reach a walkdir() that unlinks a ton of temporary
files, and has a CFI() in it.

Maybe that particular case should just be using
HOLD_CANCEL_INTERRUPTS() instead, but that's not quite bulletproof
enough (see note about parallel interrupts not respecting it), which
made me start wondering about some other way to say "hold everything
except non-ereturning interrupts".



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)
Next
From: Michael Paquier
Date:
Subject: Re: Add --{no-,}bypassrls flags to createuser