Re: rotatelog / logrotate with PostgreSQL

scott.marlowe <scott.marlowe@ihs.com>

From: "scott.marlowe" <scott.marlowe@ihs.com>
To: "Johnson, Shaunn" <SJohnson6@bcbsm.com>
Cc: <pgsql-general@postgresql.org>
Date: 2002-09-24T20:52:11Z
Lists: pgsql-general
On Mon, 23 Sep 2002, Johnson, Shaunn wrote:

> Howdy:
> 
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2 kernel 2.4.7.
> 
> Can someone send an example of how they have the 
> logrotate / rotatelog script working with PostgreSQL?
> I'm looking at a few things and I can't seem to
> get it to work.
> 
> Also, is there an easy way to tell if PostgreSQL have
> been configured with "--enable-syslog"?  If I have that,
> then I can just use the syslog.conf and collect logs 
> that way.

My rc.local line looks something like this:

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