Re: duration logging setting in 7.4 - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: duration logging setting in 7.4
Date
Msg-id 200311181507.hAIF7mX04577@candle.pha.pa.us
Whole thread Raw
In response to Re: duration logging setting in 7.4  (Ryszard Lach <siaco@autograf.pl>)
Responses Re: duration logging setting in 7.4  (Ryszard Lach <ryszard@lach.name>)
List pgsql-performance
Wow, that is strange.  If you don't use syslog, do you see the proper
output?  If you turn on log_statement, do you see the statements?

---------------------------------------------------------------------------

Ryszard Lach wrote:
> On Mon, Nov 17, 2003 at 09:37:07PM -0500, Bruce Momjian wrote:
> > Ryszard Lach wrote:
> > >
> > > Hi.
> > >
> > > I'm trying to set run-time environment in pgsql7.4 so, that it prints
> > > all statements with duration time, but I can't understand why setting
> > > log_min_duration_statement to '0' causes printing to syslog plenty of
> > > lines ending with 'duration: statement:', i.e. without any statement
> > > string (except expected ones). Can anybody help me?
> >
> > Can you show us some of the log file?  If I do:
> >
>
> Sure.
>
> Nov 18 10:05:20  postgres[1348]: [318-1] LOG:  duration: 0.297 ms  statement:
> Nov 18 10:05:20  postgres[1311]: [5477-1] LOG:  duration: 0.617 ms  statement:
> Nov 18 10:05:20  postgres[1312]: [5134-1] LOG:  duration: 0.477 ms  statement:
> Nov 18 10:05:20  postgres[1349]: [318-1] LOG:  duration: 0.215 ms  statement:
> Nov 18 10:05:20  postgres[1313]: [5449-1] LOG:  duration: 0.512 ms  statement:
> Nov 18 10:05:20  postgres[1314]: [5534-1] LOG:  duration: 0.420 ms  statement:
> Nov 18 10:05:20  postgres[1330]: [772-1] LOG:  duration: 1.386 ms  statement: SELECT * FROM mytablemius WHERE id = 0;
> Nov 18 10:05:20  postgres[1315]: [5757-1] LOG:  duration: 0.417 ms  statement:
> Nov 18 10:05:20  postgres[1316]: [5885-1] LOG:  duration: 0.315 ms  statement:
> Nov 18 10:05:20  postgres[1317]: [5914-1] LOG:  duration: 0.301 ms  statement:
> Nov 18 10:05:20  postgres[1318]: [5990-1] LOG:  duration: 0.293 ms  statement:
> Nov 18 10:05:20  postgres[1319]: [6009-1] LOG:  duration: 0.211 ms  statement:
> Nov 18 10:05:20  postgres[1320]: [6039-1] LOG:  duration: 0.188 ms  statement:
>
>
> this is with setting
>
> log_duration = false
> log_statement = false
> log_min_duration_statement = 0
>
> The amount of lines containing statement string is nearly the same ase before
> upgrade (from 7.3), all other lines are extra.
>
> I don't know if this can be a reason, this is on a pretty busy machine (ca. 100
> selects/second, but loadavg lower then 0.9), I'm logging postgres through syslog.
>
> Richard.
>
> --
> "First they ignore you. Then they laugh at you. Then they
> fight you. Then you win." - Mohandas Gandhi.
>

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

pgsql-performance by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Join on incompatible types
Next
From: Harald Fuchs
Date:
Subject: Re: Top n queries and GROUP BY