From: Egon Kocjan <ekocjan@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Date: Thu, 3 Sep 2015 10:24:49 +0200
Message-ID: <55E803D1.9090004@gmail.com> (raw)
In-Reply-To: <CAB7nPqQ+CybqD8-MemC0qQrUwC3eCOTGqpmTSKfSvBm6GdBsjg@mail.gmail.com>
References: <20150828104658.2089.83265@wrigleys.postgresql.org>
<CAB7nPqSbyTrYcGdHzE5G37npi=1unuLjNAg8O_BxHj9kurRD5w@mail.gmail.com>
<55E46B04.7070102@gmail.com>
<CAB7nPqQ+CybqD8-MemC0qQrUwC3eCOTGqpmTSKfSvBm6GdBsjg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 1.9.2015 3:43, Michael Paquier wrote:
> On Mon, Aug 31, 2015 at 11:56 PM, Egon Kocjan wrote:
>> 2) However there is no output on stderr when pg_ctl is running as a
>> subprocess of a service. So I would still have to patch pg_ctl if I want
>> stderr. I haven't looked into elog.c yet, maybe stderr from there would be
>> good to have as well? So far, pg_ctl output and pg_logs\* was enough for me
>> to debug the installations. Technically, I could also monitor Windows event
>> log and dump events on the fly into my report file. But it seems simpler to
>> just patch PostgreSQL locally to force stderr and reuse all the logic from
>> the Unix port...
> I wished we had such a switch a couple of times and I have as well
> some code paths that would benefit a redirection of those logs to
> stderr instead of the event log. Still this sounds like a new feature
> to me. Hence, what about for example adding a Windows-only option that
> can be used to enforce where logs are redirected, let's say
> --log-output with the following values:
> - default, which is what we have now
> - stderr, to enforce the output to stderr
> - eventlog, to enforce redirection to the event logs.
> Would you like to work on this patch?
>
Yes, I would start with pg_ctl itself. Then we can look into what else
needs to be done for the backend, I'm not yet 100% sure how it all fits
together.
Regards
Egon
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: ekocjan@gmail.com, michael.paquier@gmail.com
Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
In-Reply-To: <55E803D1.9090004@gmail.com>
References: <20150828104658.2089.83265@wrigleys.postgresql.org> <CAB7nPqSbyTrYcGdHzE5G37npi=1unuLjNAg8O_BxHj9kurRD5w@mail.gmail.com> <55E46B04.7070102@gmail.com> <CAB7nPqQ+CybqD8-MemC0qQrUwC3eCOTGqpmTSKfSvBm6GdBsjg@mail.gmail.com> <55E803D1.9090004@gmail.com>
* 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