Jan Wieck wieck at lists.slony.info
Thu May 31 06:29:50 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/ducttape
In directory main.slony.info:/tmp/cvs-serv1063/src/ducttape

Modified Files:
      Tag: REL_1_2_STABLE
	Makefile test_8_logship.in 
Log Message:
Fix archive log ship tracking. Slon now tracks the setsync status in memory
and generates a void archive with the correct old,new event seqno for all
events.

Jan


Index: test_8_logship.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_8_logship.in,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** test_8_logship.in	4 Jul 2005 23:45:21 -0000	1.1
--- test_8_logship.in	31 May 2007 13:29:48 -0000	1.1.2.1
***************
*** 24,31 ****
  export PATH
  TMPOUT=/tmp/output.$$
! LOGSHIPDIR=/tmp/logs.$$
  mkdir -p $LOGSHIPDIR
  DB1=slony_test1
  DB2=slony_test2
  CLUSTERNAME=T1
  PGBENCH_SCALE=1
--- 24,33 ----
  export PATH
  TMPOUT=/tmp/output.$$
! LOGSHIPDIR=./offline_logs
  mkdir -p $LOGSHIPDIR
+ rm -f $LOGSHIPDIR/*
  DB1=slony_test1
  DB2=slony_test2
+ DB3=slony_test3
  CLUSTERNAME=T1
  PGBENCH_SCALE=1
***************
*** 96,99 ****
--- 98,103 ----
  dropdb $DB2 || echo "**** ignored"
  sleep 1
+ dropdb $DB3 || echo "**** ignored"
+ sleep 1
  
  #####
***************
*** 146,151 ****
  slonik <<_EOF_
  	include <$PREAMBLE_FILE>;
  	try {
! 		table add key (node id = @origin, fully qualified name = 'public.history');
  	}
  	on error {
--- 150,156 ----
  slonik <<_EOF_
  	include <$PREAMBLE_FILE>;
+ 
  	try {
! 		table add key (node id = 11, fully qualified name = 'public.history');
  	}
  	on error {
***************
*** 166,170 ****
  		set add table (set id = 1, origin = @origin,
  			id = 4, fully qualified name = 'public.history',
! 			key = serial, comment = 'Table accounts');
  	}
  	on error {
--- 171,175 ----
  		set add table (set id = 1, origin = @origin,
  			id = 4, fully qualified name = 'public.history',
! 			key = serial, comment = 'Table history');
  	}
  	on error {
***************
*** 235,243 ****
  fi
  
! echo "**** starting the Slony-I node daemon for $DB1"
  $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"
  
  #####
  # Check that pgbench is still running
--- 240,251 ----
  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"
  
+ echo "**** taking offline_dump.sql from $DB2 for logshipping"
+ sh ../../tools/slony1_dump.sh $DB2 T1 >offline_dump.sql
+ 
  #####
  # Check that pgbench is still running
***************
*** 282,285 ****
  kill $slon2_pid 2>/dev/null
  
! ./compare_pgbench_dumps $DB1 $DB2
  rm $PREAMBLE_FILE
--- 290,313 ----
  kill $slon2_pid 2>/dev/null
  
! 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
! psql -q $DB3 <<_EOF_
! 	alter table history add column "_Slony-I_T1_rowID" bigint;
! _EOF_
! echo "---- loading all offline log archives"
! for afile in $LOGSHIPDIR/*.sql ; do
! 	psql -q $DB3 <$afile
! done
! 
! sh ./compare_pgbench_dumps $DB1 $DB3
! 
  rm $PREAMBLE_FILE

Index: Makefile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/Makefile,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C2 -d -r1.12 -r1.12.2.1
*** Makefile	2 Aug 2006 15:32:02 -0000	1.12
--- Makefile	31 May 2007 13:29:48 -0000	1.12.2.1
***************
*** 33,36 ****
--- 33,38 ----
  		fi; \
  	done;\
+ 	rm -rf dump.tmp.*
+ 	rm -rf offline_dump.sql offline_logs
  
  install: all installdirs



More information about the Slony1-commit mailing list