Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup - Mailing list pgsql-hackers

From MauMau
Subject Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Date
Msg-id 1BF952F57B6C4DDAA73F77807C4F33B0@maumau
Whole thread Raw
Responses Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
I'm sorry to interrupt you, but how should I treat this bug report I issued? 
Should I submit a bug fix patch for the latest source code (=v9.1)? I wish 
the fix will be back-patched in 8.3, too.

If yes, I would like to get a concensus on the solution. As I mentioned, I 
think that it is enough to just remove the two 
write_eventlog(EVENTLOG_INFORMATION_TYPE) calls. Although this may not be 
complete, it will be practical. The users feel it annoying that PostgreSQL 
always outputs informational (and perhaps useless) event log records at 
startup. As for errors, we can say "pg_ctl emits event logs when it 
encounters errors. This is a specification for troubleshooting. Currently, 
we cannot suppress error event logs emitted by pg_ctl according to your 
log_destination setting."

If the solution is okay, should I really submit a patch for just removing 
two lines? Or, can I expect that some committer will modify and commit the 
change directly?

Regards,
MauMau

From: ""MauMau"" <maumau307@gmail.com>
Sent: Saturday, May 07, 2011 9:35 AM
Subject: Re: [BUGS] BUG #6011: Some extra messages are output in the event 
log at PostgreSQL startup
>> Magnus Hagander <magnus@hagander.net> writes:
>>> 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.
>>
>
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
>> 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.
>
> I think that those two messages in question are not very helpful, so I 
> hope those are omitted by default (i.e. even without pg_ctl's -s). If they 
> are useful and should be logged in the event log, why aren't they logged 
> in syslog on UNIX/Linux?
>
> So, I wish that the direct calls to write_eventlog will be eliminated. If 
> those messages are useful for some reason, it may be okay that pg_ctl's -s 
> hides them at worst. However, it's better to remove the write_eventlog 
> calls in question, because those software dependent on PostgreSQL have to 
> be modified to add -s.
>
> Can I expect this will be treated as a bug and fixed in 8.3.x too? BTW, 
> how can I check the bug treatment? I saw somewhere that you don't like 
> issue trackers such as JIRA or Bugzilla.
>



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: performance-test farm
Next
From: Tom Lane
Date:
Subject: Re: Uninitialized SSL values? (was: Fix for bug in ldapServiceLookup in libpq)