Re: Proposed GUC Variable

From: Karl DeBisschop <kdebisschop(at)alert(dot)infoplease(dot)com>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed GUC Variable
Date: 2002-08-27 23:18:38
Message-ID: 1030490320.1090.3.camel@miles.debisschop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2002-08-27 at 17:17, Larry Rosenman wrote:
> On Tue, 2002-08-27 at 16:14, Bruce Momjian wrote:
> > Larry Rosenman wrote:
> > > > But we should have some default to print some of the query, because
> > > > right now we print none of it. I am not saying it is perfect, but it is
> > > > better than what we have, and is a reasonable default.
> > > On an error, you may not be able to reproduce it. Why not print the
> > > whole query to the log?
> > >
> > > I don't see a reason for truncating it at 80 chars.
> > >
> > > IMHO, of course.
> >
> > Because every typo query, every syntax error of a user in psql would
> > appear in your logs. That seems excessive. Already the ERROR line
> > appears in the logs. Do we want to see their bad query too?
> >
> > My concern is that long queries could easily bulk up the logs to the
> > point where the actual important log messages would be lost in the fog.
> Hmm. I think the 80 should be a GUC variable (and also settable from
> SQL SET as well), and the 80 should probably be higher.
>
> And, maybe send the full query at a different Syslog(3) level.

Not sure whether it can be done easily, but I think I'd prefer to log it
to a different file/facility. That lets me keep the full query for the
users, without swamping the sysadmin's logs. Just my $0.02.

--
Karl

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-27 23:34:18 Re: fix for palloc() of user-supplied length
Previous Message Bruce Momjian 2002-08-27 23:18:25 Re: LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-08-27 23:34:18 Re: fix for palloc() of user-supplied length
Previous Message Bruce Momjian 2002-08-27 23:17:36 Re: Proposed GUC Variable