Re: "unexpected EOF" messages

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "unexpected EOF" messages
Date: 2012-05-03 15:20:32
Message-ID: 1336057943-sup-208@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-05-03 15:33:54 Re: "unexpected EOF" messages
Previous Message Tom Lane 2012-05-03 15:12:14 Re: How hard would it be to support LIKE in return declaration of generic record function calls ?