Jan Wieck wieck at lists.slony.info
Sun Jul 29 10:38:25 PDT 2007
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv4576

Modified Files:
	remote_worker.c 
Log Message:
Fixed a problem with the setsync tracking in cases where slon does
an internal restart (thereby rereading the pset.ssy_seqno) and ignoring
non-SYNC events because those don't change the sl_setsync table.


Jan


Index: remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -d -r1.149 -r1.150
*** remote_worker.c	20 Jul 2007 20:20:13 -0000	1.149
--- remote_worker.c	29 Jul 2007 17:38:23 -0000	1.150
***************
*** 387,394 ****
  						{
  							slon_mkquery(&query1,
! 								"select max(ssy_seqno) from %s.sl_setsync "
  								"  where ssy_setid = %d "
! 								"    and ssy_origin = %d; ",
! 								rtcfg_namespace, pset->set_id, node->no_id);
  							if (query_execute(node, local_dbconn, &query1) < 0)
  								slon_retry();
--- 387,401 ----
  						{
  							slon_mkquery(&query1,
! 								"select max(ssy_seqno) from ("
! 								"select ssy_seqno from %s.sl_setsync "
  								"  where ssy_setid = %d "
! 								"    and ssy_origin = %d "
! 								"union "
! 								"select ev_seqno from %s.sl_event "
! 								"  where ev_origin = %d "
! 								"    and ev_type <> 'SYNC' "
! 								") as S; ",
! 								rtcfg_namespace, pset->set_id, node->no_id,
! 								rtcfg_namespace, node->no_id);
  							if (query_execute(node, local_dbconn, &query1) < 0)
  								slon_retry();



More information about the Slony1-commit mailing list