Re: more contrib: log rotator

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Sullivan <andrew(at)libertyrms(dot)info>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more contrib: log rotator
Date: 2003-04-07 15:35:07
Message-ID: Pine.LNX.4.33.0304070933150.14934-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 6 Apr 2003, Peter Eisentraut wrote:

> Tom Lane writes:
>
> > Seems like a good bare-bones file writer; but how about all those
> > frammishes that people ask for like generating date-based filenames,
> > switching every so many bytes, etc? Also, it'd be nice not to be
> > dependent on a cron job to tickle the switchover.
>
> Linux systems have a standard system log rotation mechanism (see
> logrotate(8)), which can rotate logs by size and time and has a number of
> other features. I would rather depend on that kind of preferred system
> mechanism than rolling out our own. And we already depend on cron for
> vacuuming anyway.

How about we set up configure to check what we're on and what's available,
(i.e. rotatelogs, logrotate, joesbiglogrotatorscript, etc...) and
configure pg_ctl to use one of them? It's a good probability that most
flavors of Unix have log rotators of some kind as a built in, and we can
include a standard one as well.

That way, if you want to use the same log rotator with postgresql as you
use with the rest of your system, you can, and if you just want the built
in one, you can use it, and if you don't want any log rotation, everything
still works the same as before.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-07 15:39:59 Re: Incorrect expected rows by ANALYZE
Previous Message scott.marlowe 2003-04-07 15:32:35 Re: Incorrect expected rows by ANALYZE