pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Fujii Masao <fujii@postgresql.org>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: stopgap fix for signal handling during restore_command
Date: Tue, 10 Oct 2023 22:29:34 -0500
Message-ID: <20231011032934.GA847236@nathanxps13> (raw)
In-Reply-To: <20231011025418.GA845134@nathanxps13>
References: <20230225192825.GA868928@nathanxps13>
	<20230225195253.hzp6pyllhn4kw4g6@awork3.anarazel.de>
	<20230225220629.GA1021641@nathanxps13>
	<20230226180029.djk7cth4o3o5doom@awork3.anarazel.de>
	<20230226193900.GA1248604@nathanxps13>
	<20230226201227.cner3cdicropu4q5@awork3.anarazel.de>
	<20230301043603.GD1453450@nathanxps13>
	<20230301224751.GA1823946@nathanxps13>
	<20231010234028.iba6wotmp22poxoh@awork3.anarazel.de>
	<20231011025418.GA845134@nathanxps13>

On Tue, Oct 10, 2023 at 09:54:18PM -0500, Nathan Bossart wrote:
> On Tue, Oct 10, 2023 at 04:40:28PM -0700, Andres Freund wrote:
>> I'd make these elog(PANIC), I think. The paths are not performance critical
>> enough that a single branch hurts, so the overhead of the check is irrelevant,
>> and the consequences of calling ProcKill() twice for the same process are very
>> severe.
> 
> Right.  Should we write_stderr_signal_safe() and then abort() to keep these
> paths async-signal-safe?

Hm.  I see that elog() is called elsewhere in proc_exit(), and it does not
appear to be async-signal-safe.  Am I missing something?

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





view thread (29+ messages)  latest in thread

Message-ID: <20231011032934.GA847236@nathanxps13>
Permalink:  ../20231011032934.GA847236@nathanxps13/
Also on:    postgresql.org/message-id/20231011032934.GA847236@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, andres@anarazel.de, thomas.munro@gmail.com, michael@paquier.xyz, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, fujii@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: stopgap fix for signal handling during restore_command
  In-Reply-To: <20231011032934.GA847236@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox