Too much logging

Started by Mike Christensenover 15 years ago5 messagesgeneral
Jump to latest
#1Mike Christensen
mike@kitchenpc.com

Hi all -

I've noticed my log files for Postgres are getting way too big, since
every single SQL statement being run ends up in the log. However,
nothing I change in postgresql.conf seems to make a bit of
difference.. I've tried restarting postgres, deleting all the
existing logs, etc. No matter what I do, every statement is logged.

What I want is to only log SQL statements that result in errors.
Here's my config options:

log_destination = 'stderr'
logging_collector = on
client_min_messages = error
log_min_messages = error
log_error_verbosity = default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'

Pretty much everything else log related is commented out.. What am I
doing wrong? Thanks!

Mike

#2Thomas Kellerer
spam_eater@gmx.net
In reply to: Mike Christensen (#1)
Re: Too much logging

Mike Christensen, 27.08.2010 11:39:

Hi all -

I've noticed my log files for Postgres are getting way too big, since
every single SQL statement being run ends up in the log. However,
nothing I change in postgresql.conf seems to make a bit of
difference.. I've tried restarting postgres, deleting all the
existing logs, etc. No matter what I do, every statement is logged.

What I want is to only log SQL statements that result in errors.
Here's my config options:

log_destination = 'stderr'
logging_collector = on
client_min_messages = error
log_min_messages = error
log_error_verbosity = default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'

Pretty much everything else log related is commented out.. What am I
doing wrong? Thanks!

log_statement = 'all'

should be

log_statement = 'none'

Regards
Thomas

#3Mike Christensen
mike@kitchenpc.com
In reply to: Thomas Kellerer (#2)
Re: Too much logging

Yup, someone emailed me privately - this fixed the problem.. Thanks!

Show quoted text

On Fri, Aug 27, 2010 at 2:55 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:

Mike Christensen, 27.08.2010 11:39:

Hi all -

I've noticed my log files for Postgres are getting way too big, since
every single SQL statement being run ends up in the log.  However,
nothing I change in postgresql.conf seems to make a bit of
difference..  I've tried restarting postgres, deleting all the
existing logs, etc.  No matter what I do, every statement is logged.

What I want is to only log SQL statements that result in errors.
Here's my config options:

log_destination = 'stderr'
logging_collector = on
client_min_messages = error
log_min_messages = error
log_error_verbosity = default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'

Pretty much everything else log related is commented out..  What am I
doing wrong?  Thanks!

log_statement = 'all'

should be

log_statement = 'none'

Regards
Thomas

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

#4Richard Harley
richard@scholarpack.com
In reply to: Mike Christensen (#1)
Re: Too much logging

Won't log state = all catch everything?

Richard

Show quoted text

On 27/08/10 10:39, Mike Christensen wrote:

Hi all -

I've noticed my log files for Postgres are getting way too big, since
every single SQL statement being run ends up in the log. However,
nothing I change in postgresql.conf seems to make a bit of
difference.. I've tried restarting postgres, deleting all the
existing logs, etc. No matter what I do, every statement is logged.

What I want is to only log SQL statements that result in errors.
Here's my config options:

log_destination = 'stderr'
logging_collector = on
client_min_messages = error
log_min_messages = error
log_error_verbosity = default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'

Pretty much everything else log related is commented out.. What am I
doing wrong? Thanks!

Mike

#5Andreas Schmitz
mailinglist@longimanus.net
In reply to: Richard Harley (#4)
Re: Too much logging

http://www.postgresql.org/docs/8.4/interactive/runtime-config-logging.html#GUC-LOG-STATEMENT

[...]

Valid values are none, ddl, mod, and all.

regards

andreas

Show quoted text

On 08/27/2010 03:01 PM, Richard Harley wrote:

Won't log state = all catch everything?

Richard

On 27/08/10 10:39, Mike Christensen wrote:

Hi all -

I've noticed my log files for Postgres are getting way too big, since
every single SQL statement being run ends up in the log. However,
nothing I change in postgresql.conf seems to make a bit of
difference.. I've tried restarting postgres, deleting all the
existing logs, etc. No matter what I do, every statement is logged.

What I want is to only log SQL statements that result in errors.
Here's my config options:

log_destination = 'stderr'
logging_collector = on
client_min_messages = error
log_min_messages = error
log_error_verbosity = default
log_min_error_statement = error
log_min_duration_statement = 3000
log_statement = 'all'

Pretty much everything else log related is commented out.. What am I
doing wrong? Thanks!

Mike