pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Reinhard Max <reinhard@m4x.de>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7559: syslogger doesn't close stdout and stderr
Date: Fri, 21 Sep 2012 14:17:46 -0400
Message-ID: <27988.1348251466@sss.pgh.pa.us> (raw)
In-Reply-To: <505CA84B.4090808@gmx.net>
References: <E1TEMgj-0005PY-Hy@wrigleys.postgresql.org>
	<29557.1348072752@sss.pgh.pa.us>
	<alpine.LNX.2.00.1209192234040.663@albrecht.home.m4x.de>
	<505AC648.7050400@vmware.com>
	<alpine.LNX.2.00.1209201036060.6939@albrecht.home.m4x.de>
	<17544.1348153582@sss.pgh.pa.us>
	<505CA84B.4090808@gmx.net>

Peter Eisentraut <peter_e@gmx.net> writes:
> On 9/20/12 11:06 AM, Tom Lane wrote:
>> Well, I would have no objection to changing pg_ctl so that it redirects
>> the postmaster's stdout/stderr when a -l switch is given (actually,
>> I thought it did that already...).  I do object to changing the logger's
>> behavior as you suggest, because that will break use-cases that work
>> today.  One that I've used personally is adding "fprintf(stderr)" calls
>> in the logger for debugging the logger itself.

> The weird thing is, when the logger process dies and is restarted by the
> postmaster, then both stdout and stderr point to /dev/null.  So the
> behavior is inconsistent either way.

Yeah, that's annoying but there's no very good way to work around it.
Fortunately, the logger doesn't die very often.  All of the use-cases
I've thought of for wanting to capture stderr output for it amount to
debugging of some form or other, so it's probably good enough for that
to only work in the first logger incarnation after database start ---
but Reinhard is proposing to make it not work at all, and that I don't
like.

			regards, tom lane




view thread (11+ messages)  latest in thread

Message-ID: <27988.1348251466@sss.pgh.pa.us>
Permalink:  ../27988.1348251466@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27988.1348251466@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, reinhard@m4x.de, hlinnakangas@vmware.com
  Subject: Re: BUG #7559: syslogger doesn't close stdout and stderr
  In-Reply-To: <27988.1348251466@sss.pgh.pa.us>
  References: <E1TEMgj-0005PY-Hy@wrigleys.postgresql.org> <29557.1348072752@sss.pgh.pa.us> <alpine.LNX.2.00.1209192234040.663@albrecht.home.m4x.de> <505AC648.7050400@vmware.com> <alpine.LNX.2.00.1209201036060.6939@albrecht.home.m4x.de> <17544.1348153582@sss.pgh.pa.us> <505CA84B.4090808@gmx.net> <27988.1348251466@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox