Re: archive_command failures report confusing exit status

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: archive_command failures report confusing exit status
Date: 2007-12-10 19:42:48
Message-ID: 1197315768.4255.1136.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 code 256
>
> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Wilhelmi 2007-12-10 20:00:44 Script to reset all sequence values in the a given DB?
Previous Message Vivek Khera 2007-12-10 19:17:00 Re: partitioned table query question