From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Flower Sun <sun_2002_flower(at)yahoo(dot)com> |
Cc: | Pgsql Group <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: log rotation script for server output |
Date: | 2003-03-25 21:15:21 |
Message-ID: | Pine.LNX.4.33.0303251412311.26255-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Ayers | 2003-03-25 21:28:59 | Re: TEXT datatype and VB6... |
Previous Message | scott.marlowe | 2003-03-25 21:11:13 | Re: TEXT datatype and VB6... |