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/