Steve Singer,,, ssinger at lists.slony.info
Wed Jul 7 07:33:30 PDT 2010
Update of /home/cvsd/slony1/slony1-engine/tools
In directory main.slony.info:/tmp/cvs-serv23247/tools

Modified Files:
	slony1_dump.sh 
Log Message:
Log shipping fixes
-slony1_dump.sh now generates a .sql file that restores in replica mode
so triggers don't fire.  It will also truncate tables before restoring
to them
-Check for the proper return code to indicate no files are queued for
processing. This will allow log_shipper to sleep waiting for more work
when no files are ready for processing.

Merged from 2.0


Index: slony1_dump.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/slony1_dump.sh,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** slony1_dump.sh	20 Aug 2007 22:36:24 -0000	1.11
--- slony1_dump.sh	7 Jul 2010 14:33:27 -0000	1.12
***************
*** 70,73 ****
--- 70,74 ----
  start transaction;
  
+ 
  -- ----------------------------------------------------------------------
  -- SCHEMA $clname
***************
*** 166,172 ****
--- 167,182 ----
  ' language plpgsql;
  
+ set session_replication_role='replica';
+ 
  _EOF_
  
  
+ 
+ for tab in $tables
+ do
+ 	eval tabname=\$tabname_$tab
+ 	echo "truncate $tabname cascade;";
+ done
+ 
  # ----
  # The remainder of this script is written in a way that



More information about the Slony1-commit mailing list