Scott Marlowe smarlowe
Mon Aug 22 20:51:13 PDT 2005
On Sat, 2005-08-13 at 13:08, Mischa Sandberg wrote:
> > Date: Fri, 12 Aug 2005 16:11:11 -0400
> > From: Sven Willenberger <sven at dmv.com>
> > Subject: [Slony1-general] Slony appears to restart every 11 minutes
> > 	and log	rotation
> > To: slony1-general at gborg.postgresql.org
> Message-ID: <1123877471.5149.35.camel at lanshark.dmv.com>

> Since you're happy with logging by redirecting output to a file, I'll
> assume the following is acceptable ...
> 
> If you want, you can implement log rotation with a one-line shell
> script. Something like this (I have no Unix box at the moment to test
> this first, so bear with me on typos):
> 
> $ (slon ... | while read; do echo $REPLY >mylog.$(date +%W); done) &
> 
> (If I recall correctly, "date +%W" returns the day-of-the-week. Choose
> your granularity and cycle as you will; a new log every hour, for the
> last 30 days.
> slon doesn't log so much stuff (at -d0) that opening a file per line is
> a real kill. If you feel that's a concern, post again, and I'll post a
> small "C" program that does the rotation.

Note that apaches log rotator should work too, and I've been using it to
rotate postgresql logs for quite some time.  Dirt simple, fast, and easy
to configure.


More information about the Slony1-general mailing list