pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ryszard Lach <ryszard@lach.name>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: duration logging setting in 7.4
Date: Wed, 19 Nov 2003 19:38:24 +0100
Message-ID: <20031119183824.GL18018@siaco.id.pl> (raw)
In-Reply-To: <200311181507.hAIF7mX04577@candle.pha.pa.us>
References: <20031118091646.GA8223@siaco.id.pl>
	<200311181507.hAIF7mX04577@candle.pha.pa.us>

On Tue, Nov 18, 2003 at 10:07:48AM -0500, Bruce Momjian wrote:
> 
> Wow, that is strange.  If you don't use syslog, do you see the proper
> output?

I've just checked this. It behaves exactly the same way.


> If you turn on log_statement, do you see the statements?

If I turn on log_min_duration_statement (i.e. set to 0), log_statement and
log_duration, then I receive something like that

Nov 17 22:33:27 postgres[22945]: [29231-1] LOG:  statement:
Nov 17 22:33:27 postgres[22945]: [29232-1] LOG:  duration: 0.198 ms
Nov 17 22:33:27 postgres[22945]: [29233-1] LOG:  duration: 0.198 ms  statement:
Nov 17 22:33:27 postgres[22946]: [29231-1] LOG:  statement:
Nov 17 22:33:27 postgres[22946]: [29232-1] LOG:  duration: 0.191 ms
Nov 17 22:33:27 postgres[22946]: [29233-1] LOG:  duration: 0.191 ms  statement:
Nov 17 22:33:27 postgres[22678]: [147134-1] LOG:  statement: select * from cms where id=1465
Nov 17 22:33:27 postgres[22679]: [154907-1] LOG:  statement:
Nov 17 22:33:27 postgres[22679]: [154908-1] LOG:  duration: 0.867 ms
Nov 17 22:33:27 postgres[22679]: [154909-1] LOG:  duration: 0.867 ms  statement:
Nov 17 22:33:27 postgres[22678]: [147135-1] LOG:  duration: 1.458 ms
Nov 17 22:33:27 postgres[22678]: [147136-1] LOG:  duration: 1.458 ms  statement: select * from cms where id=1465
Nov 17 22:33:27 postgres[22680]: [158366-1] LOG:  statement:
Nov 17 22:33:27 postgres[22680]: [158367-1] LOG:  duration: 0.620 ms
Nov 17 22:33:27 postgres[22680]: [158368-1] LOG:  duration: 0.620 ms  statement:
Nov 17 22:33:27 postgres[22681]: [161294-1] LOG:  statement:
Nov 17 22:33:27 postgres[22681]: [161295-1] LOG:  duration: 0.650 ms

It seems, that log_duration is responsible only for "duration:" lines,
log_statement - for "statement:" ones, and "log_min_duration_statement" - for
"duration: .* statement:". I think, that the above output should exclude losing
of data by syslog from further delibarations. Do you thing that could be
a bug? 

There is another one thing: logs from the same database running on 7.3 and the same
application contained lines like 'select getdatabaseencoding()', 'select
datestyle()' and similar (not used by application explicite, probably
added by JDBC driver), now they are missed - maybe this is the
problem?

Richard.

-- 
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.



view thread (12+ messages)  latest in thread

Message-ID: <20031119183824.GL18018@siaco.id.pl>
Permalink:  ../20031119183824.GL18018@siaco.id.pl/
Also on:    postgresql.org/message-id/20031119183824.GL18018@siaco.id.pl

 · 

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: ryszard@lach.name, pgman@candle.pha.pa.us
  Subject: Re: duration logging setting in 7.4
  In-Reply-To: <20031119183824.GL18018@siaco.id.pl>

* 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