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

From Noah Misch
Subject Re: Proposal: leave a hint when switching logging away from stderr
Date
Msg-id 20130810043606.GA473340@tornado.leadboat.com
Whole thread Raw
In response to Re: Proposal: leave a hint when switching logging away from stderr  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: leave a hint when switching logging away from stderr  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Aug 09, 2013 at 06:59:13PM -0400, Tom Lane wrote:
> 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.

Perhaps the chatter would most affect use, typically casual, of pg_ctl without
"-l" or similar.

> 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.

I think of the "implicit sequence" messages we moved from NOTICE to DEBUG1
somewhat recently.  No doubt those messages had helped at times, but they
didn't quite carry their weight at NOTICE.  My gut prediction is that this
will fall in that same utility range.  But you make a valid point about noise
in the startup log being easier to discount.

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: killing pg_dump leaves backend process
Next
From: Pavel Stehule
Date:
Subject: proposal: lob conversion functionality