Re: BUG #7559: syslogger doesn't close stdout and stderr

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #7559: syslogger doesn't close stdout and stderr
Дата
Msg-id 27988.1348251466@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #7559: syslogger doesn't close stdout and stderr  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: BUG #7559: syslogger doesn't close stdout and stderr  (Reinhard Max <Reinhard@m4x.de>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #7559: syslogger doesn't close stdout and stderr
Следующее
От: Reinhard Max
Дата:
Сообщение: Re: BUG #7559: syslogger doesn't close stdout and stderr