pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Campbell, Lance <lance@uiuc.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL Monitoring
Date: Tue, 09 Oct 2007 16:07:59 +0100
Message-ID: <470B994F.1040405@enterprisedb.com> (raw)
In-Reply-To: <B10E6810AC2A2F4EA7550D072CDE8760197DA7@SAB-FENWICK.sab.uiuc.edu>
References: <B10E6810AC2A2F4EA7550D072CDE8760197DA7@SAB-FENWICK.sab.uiuc.edu>

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



view thread (7+ messages)  latest in thread

Message-ID: <470B994F.1040405@enterprisedb.com>
Permalink:  ../470B994F.1040405@enterprisedb.com/
Also on:    postgresql.org/message-id/470B994F.1040405@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: heikki@enterprisedb.com, lance@uiuc.edu
  Subject: Re: SQL Monitoring
  In-Reply-To: <470B994F.1040405@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox