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: Sun, 26 Feb 2023 11:39:00 -0800
Message-ID: <20230226193900.GA1248604@nathanxps13> (raw)
In-Reply-To: <20230226180029.djk7cth4o3o5doom@awork3.anarazel.de>
References: <20230223231503.GA743455@nathanxps13>
<CA+hUKG+d+u2BZu=N4q15EbR7s52KugSQeQ8eUXE8iuEBe108ng@mail.gmail.com>
<20230224043323.GA821522@nathanxps13>
<20230225190742.lfopue3nkrvxxoie@awork3.anarazel.de>
<20230225192825.GA868928@nathanxps13>
<20230225195253.hzp6pyllhn4kw4g6@awork3.anarazel.de>
<20230225220629.GA1021641@nathanxps13>
<20230226180029.djk7cth4o3o5doom@awork3.anarazel.de>
On Sun, Feb 26, 2023 at 10:00:29AM -0800, Andres Freund wrote:
> On 2023-02-25 14:06:29 -0800, Nathan Bossart wrote:
>> On Sat, Feb 25, 2023 at 11:52:53AM -0800, Andres Freund wrote:
>> > I think I opined on this before, but we really ought to have a function to do
>> > some minimal signal safe output. Implemented centrally, instead of being open
>> > coded in a bunch of places.
>>
>> While looking around for the right place to put this, I noticed that
>> there's a write_stderr() function in elog.c that we might be able to use.
>> I used that in v9. WDYT?
>
> write_stderr() isn't signal safe, from what I can tell.
*facepalm* Sorry.
What precisely did you have in mind? AFAICT you are asking for a wrapper
around write().
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
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: <20230226193900.GA1248604@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