Re: Use standard die() handler for SIGTERM in bgworkers

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use standard die() handler for SIGTERM in bgworkers
Date: 2026-02-17 21:35:25
Message-ID: aZTfHbLIjIjqzehN@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 17, 2026 at 11:18:00PM +0200, Heikki Linnakangas wrote:
> On 14/02/2026 23:56, Andres Freund wrote:
>> Uh, huh. So we were defaulting to completely unsafe code in bgworkers all this
>> time? This obviously can self-deadlock against memory allocations etc in the
>> interrupted code... Or cause confusion with the IO streams for stderr. Or ...
>
> Yep.
>
> Here's this patch again, now with updated documentation.

Looks reasonable to me.

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-17 21:36:06 Re: AIX support
Previous Message Andrew Dunstan 2026-02-17 21:31:02 Re: BackgroundPsql swallowing errors on windows