On Wed, May 25, 2022 at 3:08 PM Andres Freund <and...@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".