Re: BUG #14001: pg_ctl error output empty/faulty

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: doublem09(at)googlemail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14001: pg_ctl error output empty/faulty
Date: 2016-03-07 22:05:27
Message-ID: CAB7nPqQuphx+G-DK2awx2nf5hBysezYp9HdoW=idC+UaqZsJJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Mar 8, 2016 at 12:41 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> On Sat, Mar 5, 2016 at 9:00 PM, <doublem09(at)googlemail(dot)com> wrote:
>>> After a brief test it seems this can be fixed by correcting the negation
>>> "if (!pgwin32_is_service())" to "if (pgwin32_is_service())" in pg_ctl.c
>>> write_stderr(...).
>
>> Indeed. I don't think that this oversight from a9676139 needs much comment...
>> --- a/src/bin/pg_ctl/pg_ctl.c
>> +++ b/src/bin/pg_ctl/pg_ctl.c
>> @@ -216,7 +216,7 @@ write_stderr(const char *fmt,...)
>> * On Win32, we print to stderr if running on a console, or write to
>> * eventlog if running as a service
>> */
>> - if (!isatty(fileno(stderr))) /* Running as a service */
>> + if (!pgwin32_is_service()) /* Running as a service */
>> {
>> Could somebody switch this condition? We should not write to the event
>> logs if this code is not run for a service.
>
> Done.

Thanks..
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-03-08 01:54:46 Re: BUG #14002: Crashes system
Previous Message Alvaro Herrera 2016-03-07 16:21:23 Re: BUG #13970: Vacuum hangs on particular table; cannot be terminated - requires `kill -QUIT pid`