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.