Re: Reducing the log spam - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Reducing the log spam
Date
Msg-id afbc703779145dd69880c5b694a0484cc71f46a6.camel@cybertec.at
Whole thread Raw
In response to Re: Reducing the log spam  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Mon, 2024-06-17 at 16:40 -0500, Justin Pryzby wrote:
> > The feature will become much less useful if unique voilations keep getting logged.
>
> Uh, to be clear, your patch is changing the *defaults*, which I found
> surprising, even after reaading the thread.  Evidently, the current
> behavior is not what you want, and you want to change it, but I'm *sure*
> that whatever default you want to use at your site/with your application
> is going to make someone else unhappy.  I surely want unique violations
> to be logged, for example.

I was afraid that setting the default non-empty would cause objections.

> > +       <para>
> > +        This setting is useful to exclude error messages from the log that are
> > +        frequent but irrelevant.
>
> I think you should phrase the feature as ".. *allow* skipping error
> logging for messages ... that are frequent but irrelevant for a given
> site/role/DB/etc."

I have reworded that part.

> I suggest that this patch should not change the default behavior at all:
> its default should be empty.  That you, personally, would plan to
> exclude this or that error code is pretty uninteresting.  I think the
> idea of changing the default behavior will kill the patch, and even if
> you want to propose to do that, it should be a separate discussion.
> Maybe you should make it an 002 patch.

I have attached a new version that leaves the parameter empty by default.

The patch is not motivated by my personal dislike of certain error messages.
A well-written application would not need that parameter at all.
The motivation for me is based on my dealing with customers' log files,
which are often full of messages that are only distracting from serious
problems and fill up the disk.

But you are probably right that it would be hard to find a default setting
that nobody has quibbles with, and the default can always be changed with
a future patch.

Yours,
Laurenz Albe

Attachment

pgsql-hackers by date:

Previous
From: Alexander Pyhalov
Date:
Subject: MergeAppend could consider sorting cheapest child path
Next
From: Nathan Bossart
Date:
Subject: Re: improve predefined roles documentation