Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 289A164FCE9 for ; Tue, 14 Oct 2008 07:29:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00277-04 for ; Tue, 14 Oct 2008 07:29:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fish.clues.ltd.uk (fish.clues.ltd.uk [80.68.93.86]) by postgresql.org (Postfix) with ESMTP id 9A7AF64FD78 for ; Tue, 14 Oct 2008 07:29:26 -0300 (ADT) Received: from fish.clues.ltd.uk ([80.68.93.86] helo=[127.0.0.1]) by fish.clues.ltd.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Kph9V-0006ax-Sq; Tue, 14 Oct 2008 11:29:22 +0100 Message-ID: <48F474CB.3060302@antibodymx.net> Date: Tue, 14 Oct 2008 11:30:35 +0100 From: "Martin A. Brooks" User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Guillaume Lelarge CC: pgsql-admin@postgresql.org Subject: Re: postgres seems to ignore log_min_duration_statement References: <48F46514.1070203@antibodymx.net> <48F4710A.1030609@lelarge.info> In-Reply-To: <48F4710A.1030609@lelarge.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/96 X-Sequence-Number: 30552 Guillaume Lelarge wrote: > Martin A. Brooks a écrit : > >> However, in the log files, I'm seeing entries for all SQL executed, not >> just that taking 5000ms or more. For example: >> >> 2008-10-14 10:15:50 BST PID:20349 DB:vhdb LOG: statement: select * from >> vendors; >> 2008-10-14 10:15:50 BST PID:20349 DB:vhdb LOG: duration: 0.259 ms >> 2008-10-14 10:15:50 BST PID:20349 DB:vhdb LOG: QUERY STATISTICS >> 2008-10-14 10:15:50 BST PID:20349 DB:vhdb DETAIL: ! system usage stats: >> ! 0.000281 elapsed 0.000000 user 0.000000 system sec >> ! [0.004000 user 0.004000 sys total] >> ! 0/0 [0/176] filesystem blocks in/out >> ! 0/0 [0/923] page faults/reclaims, 0 [0] swaps >> ! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent >> ! 0/0 [8/0] voluntary/involuntary context switches >> ! buffer usage stats: >> ! Shared blocks: 0 read, 0 written, >> buffer hit rate = 100.00% >> ! Local blocks: 0 read, 0 written, >> buffer hit rate = 0.00% >> ! Direct blocks: 0 read, 0 written >> >> > > This last log is enabled with the log_statement_stats parameter. Set it > to off to disable it. > > I _want_ the stats, however I _only_ want the stats for queries taking over 5 seconds. -- Martin A. Brooks | http://www.antibodymx.net/ | Anti-spam & anti-virus Consultant | martin@antibodymx.net | filtering. Inoculate antibodymx.net | m: +447792493388 | your mail system.