Tom Lane writes:
> Aren't there log-rotation utilities out there already? (I seem to
> recall mention that Apache has one, for instance.) Seems like this
> is a wheel we shouldn't have to reinvent.
I'm aware of the Apache rotatelogs utility, but I'm not completely
satisfied with it.
1. It tries to do the rotating itself. I'd rather rely on the OS'
rotating and archiving facilities.
2. Only offers a time-based rotate, no manual intervention possible (via
signal).
3. We don't want to have to tell people to install Apache and patch their
pg_ctl.
4. We don't want to include it in our distribution because the license
contains an advertisement clause.
It's not like what I wrote is going to look wildly different than theirs.
There's only so much variation you can put into 100 lines of code.
> > And no, "use syslog" doesn't count.
>
> Why not?
1. Might not be available (?)
2. Might not be reliable
3. Might not have root access
4. Not all messages will go through elog. This is a bug, but not trivial
to fix.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter