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 EBE4DD1B57C for ; Wed, 19 Nov 2003 18:59:02 +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 38736-06 for ; Wed, 19 Nov 2003 14:58:32 -0400 (AST) Received: from candle.pha.pa.us (unknown [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 716DFD1BB42 for ; Wed, 19 Nov 2003 14:58:29 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id hAJIwR810214; Wed, 19 Nov 2003 13:58:27 -0500 (EST) From: Bruce Momjian Message-Id: <200311191858.hAJIwR810214@candle.pha.pa.us> Subject: Re: duration logging setting in 7.4 In-Reply-To: <20031119183824.GL18018@siaco.id.pl> To: Ryszard Lach Date: Wed, 19 Nov 2003 13:58:27 -0500 (EST) Cc: pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/164 X-Sequence-Number: 4724 Ryszard Lach wrote: > 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? Yes, the problem is not related to syslog. Are you using prepared queries, perhaps? I don't think those show the query, but it seems we should display something better than blanks. > 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? No, those are missing because the new 7.4 wire protocol doesn't require those queries anymore --- the data is send automatically. -- 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