Fri Aug 20 19:06:26 PDT 2004
- Previous message: [Slony1-commit] By cbbrowne: This addresses two bugs: 1.
- Next message: [Slony1-commit] By cbbrowne: Plenty of minor corrections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Add support for Apache "rotatelogs"; if you specify a path to this tool, logs will be spooled through the log rotator so that their size is kept limited in size. Modified Files: -------------- slony1-engine/tools/altperl: README (r1.4 -> r1.5) slon-tools.pm (r1.5 -> r1.6) slon.env (r1.3 -> r1.4) -------------- next part -------------- Index: slon-tools.pm =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon-tools.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -Ltools/altperl/slon-tools.pm -Ltools/altperl/slon-tools.pm -u -w -r1.5 -r1.6 --- tools/altperl/slon-tools.pm +++ tools/altperl/slon-tools.pm @@ -124,7 +124,12 @@ sub start_slon { my ($nodenum) = @_; my ($dsn, $dbname) = ($DSN[$nodenum], $DBNAME[$nodenum]); - my $cmd = "$SLON_BIN_PATH/slon -s 1000 -d2 $SETNAME '$dsn' 2>$LOGDIR/slon-$dbname-node$nodenum.err >$LOGDIR/slon-$dbname-$nodenum.out &"; + my $cmd; + if ($APACHE_ROTATOR) { + $cmd = "$SLON_BIN_PATH/slon -s 1000 -d2 $SETNAME '$dsn' 2>&1 | $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/$dbname_%Y-%m-%d_%H:%M:%S.log\" 10M &"; + } else { + $cmd = "$SLON_BIN_PATH/slon -s 1000 -d2 $SETNAME '$dsn' 2>&1 > $LOGDIR/slony1/node$nodenum/$dbname.log &"; + } print "Invoke slon: $cmd\n"; system $cmd; } Index: slon.env =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon.env,v retrieving revision 1.3 retrieving revision 1.4 diff -Ltools/altperl/slon.env -Ltools/altperl/slon.env -u -w -r1.3 -r1.4 --- tools/altperl/slon.env +++ tools/altperl/slon.env @@ -9,6 +9,7 @@ $SETNAME=flex2test; $LOGDIR='/opt/logs/slon'; $SLON_BIN_PATH='/opt/OXRS/dbs/pgsql74/bin'; + #$APACHE_ROTATOR="/opt/OXRS/apache/rotatelogs"; # optional path to Apache rotatelog tool add_node(host => 'marge', dbname=>'transtest', port=>5532, user=>'postgres', password=>'postgres', node=>1); @@ -39,7 +40,6 @@ # isn't smart enough (yet) to discover the key. %KEYEDTABLES=( - table1 => 'index_on_table1', table2 => 'index_on_table2' ); Index: README =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/README,v retrieving revision 1.4 retrieving revision 1.5 diff -Ltools/altperl/README -Ltools/altperl/README -u -w -r1.4 -r1.5 --- tools/altperl/README +++ tools/altperl/README @@ -12,6 +12,24 @@ having an arbitrary number of Slony-I nodes. They are configured in slon.env by calling add_node() once for each node that is needed. +The following configuration is set up: + + $SETNAME represents the name of the cluster. In each database + involved in the replication set, you will find the namespace + "_$SETNAME" that contains Slony-I's configuration tables + + $SLON_BIN_PATH is the path to use to find the slon and slonik + binaries. + + $LOGDIR is the directory in which to put log files. The script will + generate a subdirectory for each node. + + $APACHE_ROTATOR is an optional reference to the location of the + Apache log rotator; if you set it to a path to an Apache "rotatelog" + program, that will be used to keep log file size down to a "dull + roar". + <http://httpd.apache.org/docs-2.0/programs/rotatelogs.html> + slon.env also contains lists of tables that are to be replicated: @PKEYEDTABLES contains all of the tables that have primary keys
- Previous message: [Slony1-commit] By cbbrowne: This addresses two bugs: 1.
- Next message: [Slony1-commit] By cbbrowne: Plenty of minor corrections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list