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 <t...@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 <alvhe...@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers