Re: stopgap fix for signal handling during restore_command

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: stopgap fix for signal handling during restore_command
Дата
Msg-id 20230301043603.GD1453450@nathanxps13
обсуждение исходный текст
Ответ на Re: stopgap fix for signal handling during restore_command  (Andres Freund <andres@anarazel.de>)
Ответы Re: stopgap fix for signal handling during restore_command  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Sun, Feb 26, 2023 at 12:12:27PM -0800, Andres Freund wrote:
> On 2023-02-26 11:39:00 -0800, Nathan Bossart wrote:
>> What precisely did you have in mind?  AFAICT you are asking for a wrapper
>> around write().
> 
> Partially I just want something that can easily be searched for, that can have
> comments attached to it documenting why what it is doing is safe.
> 
> It'd not be a huge amount of work to have a slow and restricted string
> interpolation support, to make it easier to write messages. Converting floats
> is probably too hard to do safely, and I'm not sure %m can safely be
> supported. But basic things like %d would be pretty simple.
> 
> Basically a loop around the format string that directly writes to stderr using
> write(), and only supports a signal safe subset of normal format strings.

Got it, thanks.  I will try to put something together along these lines,
although I don't know if I'll pick up the interpolation support in this
thread.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Weird failure with latches in curculio on v15
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Normalization of utility queries in pg_stat_statements