Re: Proposal: leave a hint when switching logging away from stderr - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: leave a hint when switching logging away from stderr
Date
Msg-id 24833.1376089153@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: leave a hint when switching logging away from stderr  (Noah Misch <noah@leadboat.com>)
Responses Re: Proposal: leave a hint when switching logging away from stderr  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> On Thu, Aug 08, 2013 at 10:32:17PM -0400, Tom Lane wrote:
>> This patch arranges to emit a hint message when/if we switch away from
>> logging to the original postmaster stderr during startup.  There are two
>> cases to cover: we're still using LOG_DESTINATION_STDERR but redirecting
>> stderr to a syslogger process, or we stop writing to stderr altogether,
>> presumably in favor of going to syslog or something.

> At LOG level, this feels a bit chatty: it's a 100% increase in startup-time
> messages if you count both the main message and the HINT.  I can't think of
> another program with configuration-directed logging that does this on every
> startup.  Makes perfect sense to me at DEBUG1, though, and that would have
> been enough for the situation you cite above.

Hm.  That would be enough for users who think to increase log_min_messages
while trying to resolve their problem.  But what I'm mainly worried about
here is people who are relative novices, so I don't have a lot of
confidence that the patch would still help them if we made the message not
appear at default logging verbosity.

Also, I'm not sure that the chattiness argument is relevant, because no
message will be emitted at all unless you're switching to some log target
different from the postmaster's initial stderr.  So the message won't show
up in the "official" log target files, only in an arguably vestigial
startup-time-messages-only file.

Does that ameliorate your concern, or do you still want it to be DEBUG1?
I'd be happier with DEBUG1 than with no message at all, but I don't think
it's going to help as many people at DEBUG1 as it would at LOG level.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: [PATCH] Statistics collection for CLUSTER command
Next
From: Josh Berkus
Date:
Subject: Re: Proposal: leave a hint when switching logging away from stderr