The current syntax in slon-tools.pm causes logs to be rotated every 10
seconds (!!) with older version of 'rotatelogs'. This patch provides a
syntax that works with older and new versions, rotating the logs every
24 hours.
It also simplifies the log file naming convention to include just the
name and year, slowing down the proliferation of slony log files.
Patch attached.
Mark
--- /usr/local/pgsql/lib/slon-tools.pm.orig Wed Feb 7 13:48:04 2007
+++ /usr/local/pgsql/lib/slon-tools.pm Fri Feb 9 10:52:06 2007
@@ -135,7 +135,7 @@
system("mkdir -p $LOGDIR/slony1/node$nodenum");
my $cmd = "/usr/local/pgsql/bin//slon -s $SYNC_CHECK_INTERVAL -d2 $CLUSTER_NAME '$dsn' 2>&1 ";
if ($APACHE_ROTATOR) {
- $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.log\" 86400 &";
} else {
my $now=`date '+%Y-%m-%d_%H:%M:%S'`;
chomp $now;
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general