Logging statements longer than 1000ms doesn't appear to work

Started by Chris Barnesover 16 years ago6 messagesgeneral
Jump to latest
#1Chris Barnes
compuguruchrisbarnes@hotmail.com

I've have set the parameter in my postgresql.conf file and have restarted postgres.

When reviewing the log file I am finding that all of the statements are being logged (0.108 ms)?

Is there some other parameter that I have missed?

log_min_duration_statement = 1000 # -1 is disabled, 0 logs all statements

Chris

_________________________________________________________________
Windows Live helps you keep up with all your friends, in one place.
http://go.microsoft.com/?linkid=9660826

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris Barnes (#1)
Re: Logging statements longer than 1000ms doesn't appear to work

Chris Barnes <compuguruchrisbarnes@hotmail.com> writes:

I've have set the parameter in my postgresql.conf file and have restarted postgres.

When reviewing the log file I am finding that all of the statements are being logged (0.108 ms)?

Perhaps you also set log_statement = all, or some other reason that
would cause them to be logged?

regards, tom lane

#3Chris Barnes
compuguruchrisbarnes@hotmail.com
In reply to: Tom Lane (#2)
Re: Logging statements longer than 1000ms doesn't appear to work

I checked and this is the only refererences. Were usng 8.3.3.

#log_statement = 'none' # none, ddl, mod, all
#log_statement_stats = off

To: compuguruchrisbarnes@hotmail.com
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Logging statements longer than 1000ms doesn't appear to work
Date: Tue, 22 Sep 2009 15:08:39 -0400
From: tgl@sss.pgh.pa.us

Chris Barnes <compuguruchrisbarnes@hotmail.com> writes:

I've have set the parameter in my postgresql.conf file and have restarted postgres.

When reviewing the log file I am finding that all of the statements are being logged (0.108 ms)?

Perhaps you also set log_statement = all, or some other reason that
would cause them to be logged?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

_________________________________________________________________
Create a cool, new character for your Windows Live™ Messenger.
http://go.microsoft.com/?linkid=9656621

#4Chris Barnes
compuguruchrisbarnes@hotmail.com
In reply to: Tom Lane (#2)
Re: Logging statements longer than 1000ms doesn't appear to work

Hello,

I looked for log_statement and it appears to be off? Strange.

#log_statement = 'none'

#log_statement_stats = off

To: compuguruchrisbarnes@hotmail.com
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Logging statements longer than 1000ms doesn't appear to work
Date: Tue, 22 Sep 2009 15:08:39 -0400
From: tgl@sss.pgh.pa.us

Chris Barnes <compuguruchrisbarnes@hotmail.com> writes:

I've have set the parameter in my postgresql.conf file and have restarted postgres.

When reviewing the log file I am finding that all of the statements are being logged (0.108 ms)?

Perhaps you also set log_statement = all, or some other reason that
would cause them to be logged?

regards, tom lane

_________________________________________________________________
We are your photos. Share us now with Windows Live Photos.
http://go.microsoft.com/?linkid=9666047

#5Gurjeet Singh
singh.gurjeet@gmail.com
In reply to: Chris Barnes (#4)
Re: Logging statements longer than 1000ms doesn't appear to work

Sometimes, your current postgresql.conf might not be in sync with server
settings, for various reasons. I'd suggest looking at the output of:

select name, setting, source from pg_settings where name like E'log\\_%';

Best regards,

On Wed, Sep 23, 2009 at 3:13 AM, Chris Barnes <
compuguruchrisbarnes@hotmail.com> wrote:

Hello,

I looked for log_statement and it appears to be off? Strange.

#log_statement = 'none'
#log_statement_stats = off

To: compuguruchrisbarnes@hotmail.com
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Logging statements longer than 1000ms doesn't

appear to work

Date: Tue, 22 Sep 2009 15:08:39 -0400
From: tgl@sss.pgh.pa.us

Chris Barnes <compuguruchrisbarnes@hotmail.com> writes:

I've have set the parameter in my postgresql.conf file and have

restarted postgres.

When reviewing the log file I am finding that all of the statements are

being logged (0.108 ms)?

Perhaps you also set log_statement = all, or some other reason that
would cause them to be logged?

regards, tom lane

------------------------------
We are your photos. Share us now with Windows Live Photos.<http://go.microsoft.com/?linkid=9666045&gt;

--
Lets call it Postgres

EnterpriseDB http://www.enterprisedb.com

gurjeet[.singh]@EnterpriseDB.com

singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
Twitter: singh_gurjeet
Skype: singh_gurjeet

Mail sent from my BlackLaptop device

#6Scott Marlowe
scott.marlowe@gmail.com
In reply to: Gurjeet Singh (#5)
Re: Logging statements longer than 1000ms doesn't appear to work

On Tue, Sep 22, 2009 at 3:55 PM, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:

Sometimes, your current postgresql.conf might not be in sync with server
settings, for various reasons. I'd suggest looking at the output of:

select name, setting, source from pg_settings where name like E'log\\_%';

Or

psql dbname
show log_statement;