Re: HOLD_INTERRUPTS() vs ProcSignalBarrier

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOLD_INTERRUPTS() vs ProcSignalBarrier
Date: 2022-05-25 03:47:11
Message-ID: CA+hUKGJevy55xyen0xeMMD1=uGXPSpnUBu3=MR7AOky_QF36Sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 25, 2022 at 3:08 PM Andres Freund <andres(at)anarazel(dot)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".

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-05-25 03:47:56 Re: Add --{no-,}bypassrls flags to createuser
Previous Message Andres Freund 2022-05-25 03:46:55 Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)