Re: fix log_min_duration_statement logic error

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-04 19:30:41
Message-ID: 200310041930.h94JUf014071@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Bruce Momjian writes:
> >> LOG: duration(secs): 0.000257
> >> LOG: duration(secs): 0.000754
> >> LOG: duration(secs): 0.008115 select * from pg_class;
>
> > I think the units typically go after the number.
>
> In any case, this is unnecessarily incompatible with everything else.
> EXPLAIN and psql's \timing show query durations in milliseconds. And
> isn't log_min_duration_statement itself measured in milliseconds?
>
> I would prefer to see the log entries look like
>
> LOG: query: select * from pg_class;
> LOG: duration: nn.nnn msec
>
> in all cases, rather than moving information around depending on which
> combination of switches happens to have caused the log entries to be
> generated. Am willing to fix the code to make this happen.

The problem with two lines is that another log message could get between
them. I agree milliseconds makes more sense for output.

Maybe:

LOG: duration: nn.nnn msec, select * from pg_class;

--
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-patches by date

  From Date Subject
Next Message Tom Lane 2003-10-04 19:43:34 Re: fix log_min_duration_statement logic error
Previous Message Alvaro Herrera 2003-10-04 19:25:34 Re: more spanish updates