pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: doublem09@googlemail.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14001: pg_ctl error output empty/faulty
Date: Mon, 07 Mar 2016 10:41:47 -0500
Message-ID: <20770.1457365307@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQVuRfj-jgw7UOdRYEfA2g2xr1_pHfgqC-yRz_0P6TPkQ@mail.gmail.com>
References: <20160305120021.2722.16982@wrigleys.postgresql.org>
	<CAB7nPqQVuRfj-jgw7UOdRYEfA2g2xr1_pHfgqC-yRz_0P6TPkQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Sat, Mar 5, 2016 at 9:00 PM,  <doublem09@googlemail.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.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <20770.1457365307@sss.pgh.pa.us>
Permalink:  ../20770.1457365307@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20770.1457365307@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, michael.paquier@gmail.com
  Subject: Re: BUG #14001: pg_ctl error output empty/faulty
  In-Reply-To: <20770.1457365307@sss.pgh.pa.us>
  References: <20160305120021.2722.16982@wrigleys.postgresql.org> <CAB7nPqQVuRfj-jgw7UOdRYEfA2g2xr1_pHfgqC-yRz_0P6TPkQ@mail.gmail.com> <20770.1457365307@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