Wed Mar 14 08:59:34 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slon sync_thread.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv8627/src/backend
Modified Files:
slony1_funcs.sql
Log Message:
Reduce the quantity of spurious events generated:
1. generate_sync_event() only needs to generate a SYNC on a node
that is the origin for a set
2. sync thread generates a SYNC when it starts; in later iterations,
it will only generate a SYNC for its node if that node is the origin
for a replication set
Per discussions with Jan Wieck on 2007-02-09; this seemed an experiment
worth trying. I tried it, and the tests run fine, so I'm committing this.
Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** slony1_funcs.sql 8 Feb 2007 18:01:15 -0000 1.104
--- slony1_funcs.sql 14 Mar 2007 15:59:32 -0000 1.105
***************
*** 5223,5227 ****
if not found then
-- If there has been no SYNC in the last interval, then push one
! perform @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SYNC'', NULL);
return 1;
else
--- 5223,5229 ----
if not found then
-- If there has been no SYNC in the last interval, then push one
! perform @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SYNC'', NULL)
! from @NAMESPACE at .sl_node n where no_id = @NAMESPACE at .getLocalNodeId(''_ at CLUSTERNAME@'')
! and exists (select 1 from @NAMESPACE at .sl_set where set_origin = no_id);
return 1;
else
***************
*** 5232,5236 ****
comment on function @NAMESPACE at .generate_sync_event(interval) is
! 'Generate a sync event if there has not been one in the requested interval.';
-- ----------------------------------------------------------------------
--- 5234,5238 ----
comment on function @NAMESPACE at .generate_sync_event(interval) is
! 'Generate a sync event if there has not been one in the requested interval, and this is a provider node.';
-- ----------------------------------------------------------------------
- Previous message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Next message: [Slony1-commit] slony1-engine/src/slon sync_thread.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list