Subject: archive_command failures report confusing exit status
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/10/2007 5:02:05 PM
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Peter Eisentraut wrote:
>> 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.
> Hmm. Getting rid of the "(PID 0)" is going to be a mess enough for
> translations that I think it is worth pgarch.c having its own routine
> for this. Furthermore I think the detailed archive command should be
> reported in an errdetail() field, which makes it even farther off.
I agree with Alvaro --- trying to make LogChildExit serve two masters
will be uglier and less maintainable than having two copies of the
not-really-so-complex logic involved. Leave postmaster.c alone and
just make pgarch.c smarter.
(But having said that, +1 for improving the message.)
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Subject: archive_command failures report confusing exit status
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/11/2007 7:43:22 PM
Peter Eisentraut <peter_e@gmx.net> writes:
> Yes, I had missed that difference. Next try ...
Looks sane to me.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
Subject: archive_command failures report confusing exit status
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/11/2007 7:59:10 PM
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Simon Riggs wrote:
>> I think you should lose the "The", if nothing else. Most Postgres
>> messages I recall say "return code = xx" not "The return code ..."
> Right, that's because they are in errmessage() and not errdetail(). The
> guidelines are different.
Right --- errdetail is supposed to be a complete sentence. (The
rationale for that is explained in TFM.) I do find the current phrasing
a bit awkward, though; what's bugging me is putting quotes around the
command string. It seems highly likely that the command string will
itself contain quotes and thus that the added quotes will be confusing.
I wonder if it'd be OK to do
The failed archive command was: %s
which is stretching the style guidelines by omitting a trailing period,
but I think that might be justifiable in this context.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
|