Re: log rotation script for server output - Mailing list pgsql-general

From scott.marlowe
Subject Re: log rotation script for server output
Date
Msg-id Pine.LNX.4.33.0303251412311.26255-100000@css120.ihs.com
Whole thread Raw
In response to log rotation script for server output  (Flower Sun <sun_2002_flower@yahoo.com>)
List pgsql-general
On Tue, 25 Mar 2003, Flower Sun wrote:

>
> Hi, group,
>
> Does any one of you write log rotation script for postgresql server output? Can you share with us?
>
> shell> pg_ctl start -D /var/lib/pgsql/data -l /var/lib/pgsql/logfiles/activity.log -o -i

I use rotatelogs from the apache package.  Make sure it's in the postgres
super user's path, create a directory for the logs that the postgres
user can write to (I use $PGDATA/pglog here) then put this line in
rc.local:

su - postgres -c 'pg_ctl start | rotatelogs $PGDATA/pglog 86400 2>1&'

Note that that's apache 1.3.x.  I haven't really had time or a need to
look at 2.x apache yet.


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: TEXT datatype and VB6...
Next
From: Andrew Ayers
Date:
Subject: Re: TEXT datatype and VB6...