Re: SQL Monitoring

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Campbell, Lance" <lance(at)uiuc(dot)edu>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: SQL Monitoring
Date: 2007-10-09 15:07:59
Message-ID: 470B994F.1040405@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Campbell, Lance wrote:
> I have noticed a slight spike in the amount of CPU usage in the last few
> weeks. I am sure it has to do with a change or two that was made to
> some queries. What is the best way to log the SQL that is being
> executed?

Take a look at statement_timeout and log_statement configuration variables.

> I would prefer to limit the size of the log file to 2 G. Is
> there a way to do this?

log_rotation_size, together with an external tool to delete old log
files. Or use log_truncate_on_rotation and log_rotation_age instead of
log_rotation_size.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gregory Stark 2007-10-09 19:00:06 Re: SQL Monitoring
Previous Message Marcin Stępnicki 2007-10-09 14:36:31 Re: SQL Monitoring