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

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Date: 2011-05-13 14:02:13
Message-ID: 36FBDD25722C4398BD537E4033EEF2BF@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
On Thu, May 12, 2011 at 2:57 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-05-13 14:48:01 Re: Unix latch implementation that wakes on postmaster death
Previous Message Bruce Momjian 2011-05-13 13:22:27 Re: 'tuple concurrently updated' error for alter role ... set