Sat Sep 8 19:37:07 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/src Makefile
- Next message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/ducttape In directory main.slony.info:/tmp/cvs-serv17109/src/ducttape Modified Files: test_8_logship.in Added Files: test_8_logshipper.conf Log Message: Add slony_logshipper to HEAD. Jan Index: test_8_logship.in =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_8_logship.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_8_logship.in 19 Jun 2007 19:14:49 -0000 1.4 --- test_8_logship.in 9 Sep 2007 02:37:04 -0000 1.5 *************** *** 51,54 **** --- 51,55 ---- kill -15 $slon2_pid fi + slony_logshipper -T ./test_8_logshipper.conf exit 1 ' 2 15 *************** *** 89,94 **** EOF - - ##### # Remove old databases, if they exist ##### --- 90,93 ---- *************** *** 240,245 **** fi echo "**** starting the Slony-I node daemon for $DB2" ! $TERMPROG -title "Slon node 22" -e sh -c "slon -d$DEBUG_LEVEL -s10000 -o10000 -g10 -a $LOGSHIPDIR $CLUSTERNAME dbname=$DB2; echo -n 'Enter>'; read line" & slon2_pid=$! echo "slon[$slon2_pid] on dbname=$DB2" --- 239,265 ---- fi + echo "**** creating pgbench tables in node 22" + ( + cat pgbench_schema.sql + ) | psql -q $DB2 + + echo "**** creating database for offline node" + if ! createdb $DB3 ; then + exit 1 + fi + + ###################################################################### + # Create the offline database for node 3 + ###################################################################### + echo "**** loading pgbench schema into $DB3" + psql -q $DB3 <./pgbench_schema.sql + echo "**** loading Slony-I offline replica schema into $DB3" + psql -q $DB3 <./offline_dump.sql + + ###################################################################### + # Start the replication daemon for node 2 + ###################################################################### echo "**** starting the Slony-I node daemon for $DB2" ! $TERMPROG -title "Slon node 22" -e sh -c "slon -d$DEBUG_LEVEL -s10000 -o10000 -g10 -a $LOGSHIPDIR -x 'slony_logshipper ./test_8_logshipper.conf' $CLUSTERNAME dbname=$DB2; echo -n 'Enter>'; read line" & slon2_pid=$! echo "slon[$slon2_pid] on dbname=$DB2" *************** *** 261,268 **** # and the attendants in the first row climb on their chairs ... ###################################################################### ! echo "**** creating pgbench tables and subscribing node 22 to set 1" ! ( ! cat pgbench_schema.sql ! ) | psql -q $DB2 slonik <<_EOF_ include <$PREAMBLE_FILE>; --- 281,285 ---- # and the attendants in the first row climb on their chairs ... ###################################################################### ! echo "**** subscribing node 22 to set 1" slonik <<_EOF_ include <$PREAMBLE_FILE>; *************** *** 291,311 **** _EOF_ echo "**** you can terminate the replication engines." sh ./compare_pgbench_dumps $DB1 $DB2 - - echo "**** creating database for offline node" - if ! createdb $DB3 ; then - exit 1 - fi - - echo "---- loading pgbench schema into $DB3" - psql -q $DB3 <./pgbench_schema.sql - echo "---- loading Slony-I offline replica schema into $DB3" - psql -q $DB3 <./offline_dump.sql - echo "---- loading all offline log archives" - for afile in $LOGSHIPDIR/*.sql ; do - psql -q $DB3 <$afile - done - sh ./compare_pgbench_dumps $DB1 $DB3 --- 308,314 ---- _EOF_ echo "**** you can terminate the replication engines." + slony_logshipper -t ./test_8_logshipper.conf sh ./compare_pgbench_dumps $DB1 $DB2 sh ./compare_pgbench_dumps $DB1 $DB3 --- NEW FILE: test_8_logshipper.conf --- # # sample slony_logshipper configuration # # Where the logshipper itself will leave its messages logfile = './offline_logs/logshipper.log'; # The logshipper needs to know the cluster name in order to # lookup what the last applied logfile was. cluster name = 'T1'; # The conninfo for the destination database is optional. If # given, the logshipper will connect to it and apply the logs. # In addition it will scan the archve dir on startup for any # log files that need to be applied before the ones given on # the command line. destination database = 'dbname=slony_test3'; # The archive dir is needed when running in database mode to # scan for missing (unapplied) archives. archive dir = './offline_logs'; # If a destination dir is specified, the logshipper will write # the result of the data massaging into result logfiles. ## destination dir = './offline_result'; # To have something in place to fight eventual resource leakage, the # daemon will enter smart shutdown mode automatically after this many # archives. max archives = 3600; # Some examples of advanced processing options: # One can filter out and rename single tables or entire namespaces. ## ignore table "public"."history"; ## rename namespace "public" to "site_001"; # Pre and post processing commands are executed via system(3). # An @ as the first character causes the exit code to be ignored. # A nonzero exitcode otherwise is treated as an error and causes # processing to abort. Pre and post processing commands have two # special variables defined: $inarchive and $outarchive. post processing command = 'gzip -9 $inarchive'; # Send email to the dba mailing list on error. All logging since # the last successfull completion of an archive is available in # the $errortext variable. error command = ' ( echo "archive=$inarchive" echo "error messages:" echo "$errortext" ) | mail -s "Slony log shipping failed" postgres at localhost ';
- Previous message: [Slony1-commit] slony1-engine/src Makefile
- Next message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list