Re: archive_command failures report confusing exit status

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: archive_command failures report confusing exit status
Дата
Msg-id 5832.1197403611@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: archive_command failures report confusing exit status  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: archive_command failures report confusing exit status  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Dienstag, 11. Dezember 2007 schrieb Tom Lane:
>> 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.

No, you are confusing the cases "called shell was killed by a signal"
and "called command was killed by a signal, which the shell then turned
around and reported to us as exit > 128".

> I have tested this:

A single test case proves little.  You need to consider race conditions
and cases where the shell is ignoring the particular signal.  I'm fairly
certain that both of these exit statuses can happen in practice, at
least with some shells/platforms.
        regards, tom lane


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: WORM and Read Only Tables (v0.1)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql \dFp's behavior