pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] log sql?
Date: Tue, 30 Jul 2002 12:32:50 -0600 (MDT)
Message-ID: <Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.com> (raw)
In-Reply-To: <20020730140939.E16703@mail.libertyrms.com>

On Tue, 30 Jul 2002, Andrew Sullivan wrote:

> On Tue, Jul 30, 2002 at 09:53:23AM -0700, Laurette Cisneros wrote:
> > Yes indeed...the size has reach 9.6M in 15 minutes...it is spewing a lot of
> > info.  Hmmm....
> 
> You really need some mechanism for rotating your logs if you are
> going to use them.  Otherwise, they become too unwieldy.

If one has apache installed, one has the mechanism installed.  Apache has 
a nice little log rotation utility called rotatelogs that can used for 
this purpose, just put it into the path of the postgres user and start the 
database like so:

pg_ctl start | rotatelogs "$PGDATA/logs/pgsql" 86400 &

where $PGDATA/logs is a directory you made and pgsql will be the name all 
your log files start with.




view thread (14+ messages)

Message-ID: <Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@ihs.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] log sql?
  In-Reply-To: <Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.com>
  References: <20020730140939.E16703@mail.libertyrms.com> <Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.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