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 E7427D1D80C for ; Tue, 18 Nov 2003 09:18:39 +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 86718-08 for ; Tue, 18 Nov 2003 05:18:09 -0400 (AST) Received: from nitrogen.id.pl (nitrogen.id.pl [193.178.214.5]) by svr1.postgresql.org (Postfix) with SMTP id 3617AD1B4E8 for ; Tue, 18 Nov 2003 05:18:04 -0400 (AST) Received: (qmail 7469 invoked by uid 0); 18 Nov 2003 09:16:50 -0000 Received: from unknown (HELO siaco.id.pl) (213.25.114.8) by smtp.id.pl with SMTP; 18 Nov 2003 09:16:50 -0000 Received: (qmail 8615 invoked by uid 1000); 18 Nov 2003 09:16:46 -0000 Date: Tue, 18 Nov 2003 10:16:46 +0100 From: Ryszard Lach To: pgsql-performance@postgresql.org Cc: Bruce Momjian Subject: Re: duration logging setting in 7.4 Message-ID: <20031118091646.GA8223@siaco.id.pl> Reply-To: Ryszard Lach References: <20031117222058.GD3248@siaco.id.pl> <200311180237.hAI2b7s29417@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <200311180237.hAI2b7s29417@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/140 X-Sequence-Number: 4700 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.