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

From Simon Riggs
Subject Re: archive_command failures report confusing exit status
Date
Msg-id 1197315768.4255.1136.camel@ebony.site
Whole thread Raw
In response to archive_command failures report confusing exit status  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Mon, 2007-12-10 at 18:27 +0100, Peter Eisentraut wrote:
> 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().

Yes, you're right.

> 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.

OK, you could sell me on that. How will you get rid of (PID = 0)?

Maybe it would be better to do that on two lines:
LOG: archive command "............." failed
FATAL: archive_command was terminated by signal ... 

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Release Note Changes
Next
From: Alvaro Herrera
Date:
Subject: Re: Release Note Changes