Re: rotatelog / logrotate with PostgreSQL

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Johnson, Shaunn" <SJohnson6@bcbsm.com>
Cc: pgsql-general@postgresql.org
Date: 2002-09-23T15:15:55Z
Lists: pgsql-general
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> Can someone send an example of how they have the 
> logrotate / rotatelog script working with PostgreSQL?

Should work to just pipe the postmaster's stderr into it, eg

	postmaster ... 2>&1 | logrotate ...  &

> Also, is there an easy way to tell if PostgreSQL have
> been configured with "--enable-syslog"?

I think pg_config would tell you, but the most reliable way is to try to
set the postgresql.conf setting and see if the postmaster will take
it...

			regards, tom lane