From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: fix log_min_duration_statement logic error |
Date: | 2003-10-05 02:49:24 |
Message-ID: | 200310050249.h952nOM22210@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> I would prefer to see the log entries look like
> >>
> >> LOG: query: select * from pg_class;
> >> LOG: duration: nn.nnn msec
>
> > The problem with two lines is that another log message could get between
> > them.
>
> That was true already with log_statement and log_duration as separate
> operations. People use log_pid to deal with it.
Attached are some emails I sent while we were discussing this feature in
March.
The idea was for the parameter to show query and duration --- a
combination that is asked for frequently and easily grep'ed, unlike
joining on pid, which because of pid wrap-around, isn't even fool-proof.
One thing that isn't implemented in current CVS is to allow 0 to always
print the duration and query (-1 disables it and is the default). I can
see that being _very_ valuable, and used enough to warrant the fact that
it isn't orthoginal (we already have log_statement). The reason we
needed to do it this way was so we could print the statement _after_ it
completes so we could include the duration.
--
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
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 0 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-05 03:12:52 | Re: fix log_min_duration_statement logic error |
Previous Message | Andrew Dunstan | 2003-10-04 23:15:15 | Re: [HACKERS] initdb |