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

From MauMau
Subject Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Date
Msg-id 36FBDD25722C4398BD537E4033EEF2BF@maumau
Whole thread Raw
In response to Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
List pgsql-hackers
From: "Robert Haas" <robertmhaas@gmail.com>
On Thu, May 12, 2011 at 2:57 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
>>> I wish the fix will be back-patched in 8.3, too.
>>
>> I guess the question is whether this is a bug which causes more
>> problems than the potential breakage which might ensue for someone
>> who relies on the current behavior. How sure can you be that nobody
>> relies on seeing those messages? No information (like a history of
>> database start times) is lost without these entries?

> I think Tom had the right idea upthread: what we should do is make the
> "-s" option to pg_ctl suppress these messages (as it does with similar
> messages on Linux).  Removing them altogether seems like overkill, for
> the reasons you mention.


Thank you, Magnus, Tom, Dave, Kevin, and Robert. Maybe I could get a 
consensus of opinion on the treatment of bug #6011. The summary is shown 
below. However, as mentioned previously, there are some concerns. So I'll 
wait for more opinions for a week, then write and test a patch, and submit 
it as a reply to this mail thread.


How to treat
========================================
Treat it as a bug. (I hope some committer will kindly back-patch to older 
versions.)

Make pg_ctl's -s option suppress informational event logging. The 
modifications are:

1. write_event_log() (pg_ctl.c)
If "-s" was specified and the level argument is EVENTLOG_INFORMATION_TYPE, 
just return without doing anything.

2. pgwin32_CommandLine() (pg_ctl.c)
If "-s" was specified when running "pg_ctl register", add "-s" to "pg_ctl 
runservice" command line built in this function.


Concerns
========================================
Existing software which use PostgreSQL needs to be modified to add -s to 
pg_ctl. Moreover, pg_ctl unregister and pg_ctl register must be performed to 
make the patch effective in existing installations.

The two messages in question may be just annoying to users, and they might 
want those messages to disappear without -s. They claim that it is 
inconsistent that those messages are not recorded in syslog on UNIX/Linux.

As described in "How to treat", the PostgreSQL Windows service must be 
registered by "pg_ctl register -s" to make use of this patch. However, 
according to the current manual, "pg_ctl register" does not take -s option. 
Actually, pg_ctl does not refuse to take -s, so this is not a big problem.

pg_ctl register [-N servicename] [-U username] [-P password] [-D datadir] 
[-w] [-t seconds] [-o options]
Regards,
MauMau



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 'tuple concurrently updated' error for alter role ... set
Next
From: Tom Lane
Date:
Subject: Re: Unix latch implementation that wakes on postmaster death