Re: "unexpected EOF" messages - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: "unexpected EOF" messages
Date
Msg-id 1336057943-sup-208@alvh.no-ip.org
Whole thread Raw
In response to Re: "unexpected EOF" messages  (Magnus Hagander <magnus@hagander.net>)
Responses Re: "unexpected EOF" messages
Re: "unexpected EOF" messages
List pgsql-hackers
Excerpts from Magnus Hagander's message of jue may 03 10:58:12 -0400 2012:
> On Thu, May 3, 2012 at 4:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > In the context of yesterday's discussions, I wonder whether a filter by
> > SQLSTATE would be appropriate.
>
> I'm worried it's not really granular enough.

Yeah.

> regexp-on-text would also have the advantage of being able to filter
> stuff coming from stored procedures or such as well - without having
> to invent a whole bunch of SQLSTATEs to put in the stored procedures
> (consider the usecase when somebody else wrote the stored procedures
> and the DBA wants to limit the logging).
>
> We could have two parameters of course - log_filter_sqlstate and
> log_filter_re or something like that...

The problem with regexes is that they are so expensive.  You just need
to forget the start anchor and it's suddenly a serious problem.  And if
you want to filter out a second message, the config option starts
to become rather unwieldy.

I wonder if there's a better way to selectively filter out messages --
say some sort of config file that contains a list of filenames/numbers
of messages to disable.  That particular idea would be a pain to
maintain, of course, not to mention that it'd change from one release to
the next.

Hey, maybe we could add a UUID to each ereport() call site ;-)

(Maybe the sites that have a load problem caused by log traffic are not
the same sites that would like to filter out messages, and thus using
regexes is not really a problem.  It doesn't seem to be the kind of bet
that we want to do.)

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Next
From: Robert Haas
Date:
Subject: Re: "unexpected EOF" messages