Re: Proposed GUC Variable

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed GUC Variable
Date: 2002-08-27 21:08:16
Message-ID: 1030482496.410.33.camel@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2002-08-27 at 16:05, Bruce Momjian wrote:
> Larry Rosenman wrote:
> > On Tue, 2002-08-27 at 15:54, Bruce Momjian wrote:
> > >
> > > I had an idea on this. It seems pretty pointless to show a query error
> > > without a query, but some queries are very large.
> > >
> > > How about if we print only the first 80 characters of the query, with
> > > newlines, tabs, and spaces reduced to a single space, and send that as
> > > LOG to the server logs. That would give people enough context, and
> > > prevent us from having another GUC variable.
> > Not necessarily giving enough context. I know I've had program
> > generated query's that were syntactically invalid WAY after the 80th
> > character.
> >
> > If you print ANY of the query, you should print all of it. Look at the
> > code in elog.c that does the syslog splitting.
>
> 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.
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-27 21:11:21 Re: Open 7.3 items
Previous Message Alvaro Herrera 2002-08-27 21:07:27 Re: [BUGS] Bug #718: request for improvement of /? to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-08-27 21:14:43 Re: Proposed GUC Variable
Previous Message Bruce Momjian 2002-08-27 21:07:18 Re: libpgtcl modifications