archive_command failures report confusing exit status - Mailing list pgsql-hackers

From Peter Eisentraut
Subject archive_command failures report confusing exit status
Date
Msg-id 200712101827.23978.peter_e@gmx.net
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: Problem of a server gettext message.
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Release Note Changes