postgres seems to ignore log_min_duration_statement

From: "Martin A(dot) Brooks" <martin(at)antibodymx(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: postgres seems to ignore log_min_duration_statement
Date: 2008-10-14 09:23:32
Message-ID: 48F46514.1070203@antibodymx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

I want to have postgres log sql statements that take longer than 5
seconds to execute. In postgresql.conf I have set
log_min_duration_statement as follows:

root(at)martin-desktop:/etc/postgresql/8.3/main# grep log_min_duration
postgresql.conf
log_min_duration_statement = 5000 # -1 is disabled, 0 logs all
statements

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

Am I missing something obvious?

Regards

--
Martin A. Brooks | http://www.antibodymx.net/ | Anti-spam & anti-virus
Consultant | martin(at)antibodymx(dot)net | filtering. Inoculate
antibodymx.net | m: +447792493388 | your mail system.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2008-10-14 10:14:34 Re: postgres seems to ignore log_min_duration_statement
Previous Message IJS/System - Joko 2008-10-11 01:27:45 Re: logging SQL statements