Jan Wieck wieck at lists.slony.info
Tue Jun 5 15:22:09 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/ducttape
In directory main.slony.info:/tmp/cvs-serv6954/src/ducttape

Modified Files:
	test_5_ddlscript test_5_pgbench.in 
Log Message:
Fix EXECUTE SCRIPT so that it records the ev_seqno for WAIT FOR EVENT
and make sure all DDL is executed in session_replication_role "local"
on the origin as well as all subscribers. This will cause the slony
triggers to ignore all DML statements while user triggers follow the
regular configuration options for ENABLE [REPLICA/ALWAYS] or DISABLE.

TODO: Put the correct session_replication_role setting into archive
logs as well.

Jan


Index: test_5_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_pgbench.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_5_pgbench.in	15 May 2007 19:40:16 -0000	1.3
--- test_5_pgbench.in	5 Jun 2007 22:22:07 -0000	1.4
***************
*** 265,275 ****
  done
  echo "**** pgbench finished"
! echo "**** please terminate the replication engines when caught up."
! wait $slon1_pid
! wait $slon2_pid
  
  kill $pgbench_pid 2>/dev/null
- kill $slon1_pid 2>/dev/null
- kill $slon2_pid 2>/dev/null
  
  echo -n "**** comparing databases ... "
--- 265,286 ----
  done
  echo "**** pgbench finished"
! sleep 1
! 
! slonik <<_EOF_
! 	cluster name = T1;
! 	node 1 admin conninfo = 'dbname=$DB1';
! 	node 2 admin conninfo = 'dbname=$DB2';
! 
! 	echo '**** Issuing slonik SYNC against DB1';
! 	sync (id = 1);
! 
! 	echo '**** Waiting for DB2 to catch up';
! 	wait for event (origin = 1, confirmed = 2, wait on = 1);
! _EOF_
! 
! 
! echo "**** you can terminate the replication engines."
  
  kill $pgbench_pid 2>/dev/null
  
  echo -n "**** comparing databases ... "

Index: test_5_ddlscript
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_ddlscript,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_5_ddlscript	18 Jun 2004 20:22:01 -0000	1.2
--- test_5_ddlscript	5 Jun 2007 22:22:07 -0000	1.3
***************
*** 82,88 ****
--- 82,98 ----
  
  	try {
+ 		echo '  execute script';
  		execute script (set id = 1, filename = 'test_5_tmp.sql',
  			event node = 1);
+ 	}
+ 	on error {
+ 		exit 1;
+ 	}
+ 
+ 	echo '  wait for execute script';
+ 	wait for event (origin = 1, confirmed = 2);
  
+ 	try {
+ 		echo '  create temporary set 999';
  		create set (id = 999, origin = 1, comment = 'temp set for new objects');
  
***************
*** 99,102 ****
--- 109,116 ----
  		exit 1;
  	}
+ 
+ 	echo '  wait for create set &co';
+ 	wait for event (origin = 1, confirmed = all, wait on = 1);
+ 	echo '  temporary set 999 ready for subscription';
  _EOF_
  



More information about the Slony1-commit mailing list