archive_command failures report confusing exit status

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема archive_command failures report confusing exit status
Дата
Msg-id 200712101827.23978.peter_e@gmx.net
обсуждение исходный текст
Ответы Re: archive_command failures report confusing exit status  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: archive_command failures report confusing exit status  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Failures of archive_command calls report a confusing exit status such as:

LOG:  archive command "cp 'pg_xlog/000000010000000000000000' '/nonexistent/000000010000000000000000'" failed: return
code256
 

The actual return code is 1; it neglects to apply WEXITSTATUS().

I figured it would make sense if pgarch.c used the same mechanism that
postmaster.c uses to report the various variants of regular and signal
exits.

I have attached a patch in that direction.  It obviously needs a bit of
string struggling to get all the cases right, but the idea should be
clear.  Comments?

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

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

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: Problem of a server gettext message.
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Release Note Changes