Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8AB8C1337BB7 for ; Fri, 6 May 2011 16:05:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 05739-01 for ; Fri, 6 May 2011 19:05:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AF6361337BC8 for ; Fri, 6 May 2011 16:05:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p46J5Com001855; Fri, 6 May 2011 15:05:12 -0400 (EDT) To: Magnus Hagander cc: MauMau , pgsql-bugs@postgresql.org Subject: Re: BUG #6011: Some extra messages are output in the event log at PostgreSQL startup In-reply-to: References: <201105061408.p46E8bK2003526@wwwmaster.postgresql.org> Comments: In-reply-to Magnus Hagander message dated "Fri, 06 May 2011 20:49:07 +0200" Date: Fri, 06 May 2011 15:05:12 -0400 Message-ID: <1854.1304708712@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/39 X-Sequence-Number: 30178 Magnus Hagander writes: > On Fri, May 6, 2011 at 16:08, MauMau wrote: >> The problem is that the following messages are always output in the event >> log at PostgreSQL startup, even when the log_destination parameter doesn't >> contain 'eventlog': >> >> [message 1] >> Waiting for server startup... >> >> [message 2] >> Server started and accepting connections >> >> One of my customers is very sensitive to extra unnecessary messages. They >> gave me a simple and reasonable question "Why are those messages output when >> event logging is disabled? Is this a bug? Is there a way to prevent these >> messages?" > Any events that happen before we have opened the regular logfile will > be written to the eventlog if the server is running as a Windows > service. There is no way to turn that off (other than removing the > code and recompiling, of course). If we didn't send those to the > eventlog, they would be completely lost since there is no stderr > available to a windows service. These particular messages appear to be coming from pg_ctl, not from the server at all, so the server logging configuration is irrelevant anyway. What I think *is* relevant is pg_ctl's -s (--silent) switch, which is defined as "only print errors, no informational messages". I would expect that to silence "waiting for ..." messages, and indeed it appears to do so in all the cases on the Unix side of the fence. However, someone chose to code these Windows-specific messages as direct write_eventlog calls instead of going through print_msg, which means that -s doesn't silence them. So possibly the OP is right that this is a bug and not just an unimplemented feature. regards, tom lane