pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Ryszard Lach <siaco@autograf.pl>
Cc: pgsql-performance@postgresql.org
Subject: Re: duration logging setting in 7.4
Date: Tue, 18 Nov 2003 10:07:48 -0500 (EST)
Message-ID: <200311181507.hAIF7mX04577@candle.pha.pa.us> (raw)
In-Reply-To: <20031118091646.GA8223@siaco.id.pl>


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



view thread (12+ messages)  latest in thread

Message-ID: <200311181507.hAIF7mX04577@candle.pha.pa.us>
Permalink:  ../200311181507.hAIF7mX04577@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200311181507.hAIF7mX04577@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pgman@candle.pha.pa.us, siaco@autograf.pl
  Subject: Re: duration logging setting in 7.4
  In-Reply-To: <200311181507.hAIF7mX04577@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox