Re: [GENERAL] log sql?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] log sql?
Date: 2002-07-30 18:32:50
Message-ID: Pine.LNX.4.44.0207301221580.21839-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Elielson Fontanezi 2002-07-30 19:20:42 formating numeric values
Previous Message Andrew Sullivan 2002-07-30 18:09:39 Re: [GENERAL] log sql?

Browse pgsql-general by date

  From Date Subject
Next Message Chris Humphries 2002-07-30 18:56:43 PosgreSQL 10 things to know about ?
Previous Message Bruce Momjian 2002-07-30 18:25:35 Re: PosgreSQL 10 things to know about ?