Re: stopgap fix for signal handling during restore_command - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: stopgap fix for signal handling during restore_command
Date
Msg-id 20231011190000.GA894647@nathanxps13
Whole thread Raw
In response to Re: stopgap fix for signal handling during restore_command  (Michael Paquier <michael@paquier.xyz>)
Responses Re: stopgap fix for signal handling during restore_command
List pgsql-hackers
On Wed, Oct 11, 2023 at 01:02:14PM +0900, Michael Paquier wrote:
> On Tue, Oct 10, 2023 at 08:39:29PM -0700, Andres Freund wrote:
>> We shouldn't call proc_exit() in a signal handler. We perhaps have a few
>> remaining calls left, but we should (and I think in some cases are) working on
>> removing those.

Got it.

> Hmm.  I don't recall anything remaining, even after a quick check.
> FWIW, I was under the impression that Thomas' work done in
> 0da096d78e1e4 has cleaned up the last bits of that.

StartupProcShutdownHandler() remains, at least.  Of the other items in
Tom's list from 2020 [0], bgworker_die() and FloatExceptionHandler() are
also still unsafe.  RecoveryConflictInterrupt() should be fixed by 0da096d,
and StandbyDeadLockHandler() and StandbyTimeoutHandler() should be fixed by
8900b5a and 8f1537d, respectively.

[0] https://postgr.es/m/148145.1599703626%40sss.pgh.pa.us

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: interval_ops shall stop using btequalimage (deduplication)
Next
From: Peter Geoghegan
Date:
Subject: Re: interval_ops shall stop using btequalimage (deduplication)