Re: [HACKERS] logging statement levels

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] logging statement levels
Date: 2004-04-06 20:01:52
Message-ID: 200404062001.i36K1qC05615@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
> Bruce Momjian wrote:
>
> >Right now we have log_min_error_statement:
> >
> > #log_min_error_statement = panic # Values in order of increasing severity:
> > # debug5, debug4, debug3, debug2, debug1,
> > # info, notice, warning, error, panic(off)
> >
> >which does allow control of printing only statements generating errors,
> >which includes syntax errors. I don't see why this functionality should
> >be mixed in with log_statement.
> >
> >Did you want a 'syntax error' level to log_statement, that would print
> >only statements with syntax errors but not other errors? That doesn't
> >seem very useful to me.
> >
> >
> >
>
> It wasn't my idea, but I thought it was a good one. But it would go
> along with the idea of these settings as a list instead of a hierarchy,
> e.g.:
>
> log_statement = "syntax-errors, ddl, mod"
>
> In fact, I liked it so much that I thought "syntax-errors" should be the
> default instead of "none".
>
> I think I'd prefer that to having it tied to the log_min_error_statement
> level. But I don't care that much.

OK, at least we understand each other. Right now we don't have any
special "syntax error" log processing. We have errors logged through
log_min_error_statement, and mod/ddl through the new log_statement.

I can see a use case for having mod/ddl control of logging, and error
control of logging, but why would you want to see syntax error queries
but not other error queries? That's why I think log_min_error_statement
is sufficient. If we add syntax logging, wouldn't that conflict with
log_min_error_statement logging, because those are errors too. Maybe we
need to add a 'synax' mode to log_min_error_statement above error that
logs only syntax errors but not others.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-04-06 20:02:39 Re: Function to kill backend
Previous Message Rod Taylor 2004-04-06 19:59:50 Re: Function to kill backend

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-04-06 20:15:23 Re: Function to kill backend
Previous Message Bruce Momjian 2004-04-06 19:37:37 Re: Function to kill backend