Here's a report and a question on log rotation using the altperl tools, on FreeBSD.
I first tried using /etc/newsyslog.conf to control log rotation, which would be my preferred method. The logs got rotated, but did slon doesn't "let go" of the space used by the old file until it is restarted. So I tried the "APACHE_ROTATOR" method, which the altperl tools have built-in support for. That started creating new log files every 10 seconds, which also seemed like a bad idea! I created this patch to slon-tools.pm to only create one log file per day: 138c138 < $cmd .= "| $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" . $dbname . "_%Y-%m-%d_%H:%M:%S.log\" 10M &"; --- > $cmd .= "| $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" . $dbname . "_%Y-%m-%d.log\" 10M &"; (Sorry about the wrapping... ) Even then, doesn't that leave me with a pruning job to do? I don't see the value of including the time stamp in the log file name. That just seems to complicate log file rotation and pruning, and is non-standard from what I've seen. Why not just use the traditional pattern, and end up with: cluster.log cluster.log.1.bz ... ? _______________________________________________ Slony1-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/slony1-general
