Re: archive_command failures report confusing exit status

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: archive_command failures report confusing exit status
Дата
Msg-id 200712111903.04709.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: archive_command failures report confusing exit status  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: archive_command failures report confusing exit status  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Am Dienstag, 11. Dezember 2007 schrieb Tom Lane:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Better patch.
>
> Doesn't this patch break the behavior that is documented in the comment?
> Specifically, the case where the restore_command dies on a signal and
> this is reported to us by the controlling shell as exitcode > 128.
> We want the archiver to die, but this patch makes it not do so.

AFAICT, the coding

WIFSIGNALED(rc) || WEXITSTATUS(rc) > 128

is simply redundant, because a signal happened exactly when WIFSIGNALED(rc) is 
true.

I have tested this:

LOG:  database system was shut down at 2007-12-11 17:15:43 CET
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
FATAL:  archive command was terminated by signal 1: Hangup
DETAIL:  The archive command was "kill -1 $$".
LOG:  archiver process (PID 22572) exited with exit code 1

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: archive_command failures report confusing exit status
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: PGparam proposal