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 74776D1CA01 for ; Tue, 18 Nov 2003 15:08:23 +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 45258-08 for ; Tue, 18 Nov 2003 11:07:56 -0400 (AST) Received: from candle.pha.pa.us (unknown [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 5B9AED1B4EF for ; Tue, 18 Nov 2003 11:07:51 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id hAIF7mX04577; Tue, 18 Nov 2003 10:07:48 -0500 (EST) From: Bruce Momjian Message-Id: <200311181507.hAIF7mX04577@candle.pha.pa.us> Subject: Re: duration logging setting in 7.4 In-Reply-To: <20031118091646.GA8223@siaco.id.pl> To: Ryszard Lach Date: Tue, 18 Nov 2003 10:07:48 -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/143 X-Sequence-Number: 4703 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