X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 020C5D1C50F for ; Wed, 19 Nov 2003 18:39:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 35921-04 for ; Wed, 19 Nov 2003 14:38:47 -0400 (AST) Received: from nitrogen.id.pl (nitrogen.id.pl [193.178.214.5]) by svr1.postgresql.org (Postfix) with SMTP id 218FED1B578 for ; Wed, 19 Nov 2003 14:38:44 -0400 (AST) Received: (qmail 26079 invoked by uid 0); 19 Nov 2003 18:38:28 -0000 Received: from unknown (HELO siaco.id.pl) (213.25.114.8) by smtp.id.pl with SMTP; 19 Nov 2003 18:38:28 -0000 Received: (qmail 19544 invoked by uid 1000); 19 Nov 2003 18:38:24 -0000 Date: Wed, 19 Nov 2003 19:38:24 +0100 From: Ryszard Lach To: Bruce Momjian Cc: pgsql-performance@postgresql.org Subject: Re: duration logging setting in 7.4 Message-ID: <20031119183824.GL18018@siaco.id.pl> Reply-To: Ryszard Lach References: <20031118091646.GA8223@siaco.id.pl> <200311181507.hAIF7mX04577@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <200311181507.hAIF7mX04577@candle.pha.pa.us> X-My-GPG-Key: echo | mail -s "send key pub" ryszard@lach.name User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/167 X-Sequence-Number: 4727 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.