Mon Oct 30 06:48:21 PST 2006
- Previous message: [Slony1-commit] By wieck: Added a safety check that prevents MERGE SET while subscribes
- Next message: [Slony1-commit] By cbbrowne: Documentation modifications to address the recent change to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Added a safety check that prevents MERGE SET while subscribes are in progress. Jan Modified Files: -------------- slony1-engine/src/backend: slony1_funcs.sql (r1.98 -> r1.99) slony1-engine/src/ducttape: test_5_subscribe (r1.2 -> r1.3) -------------- next part -------------- Index: slony1_funcs.sql =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.98 retrieving revision 1.99 diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.98 -r1.99 --- src/backend/slony1_funcs.sql +++ src/backend/slony1_funcs.sql @@ -2540,6 +2540,20 @@ end if; -- ---- + -- Check that all ENABLE_SUBSCRIPTION events for the set are confirmed + -- ---- + if exists (select true from @NAMESPACE at .sl_event + where ev_type = ''ENABLE_SUBSCRIPTION'' + and ev_data1 = p_add_id + and ev_seqno > (select max(con_seqno) from @NAMESPACE at .sl_confirm + where con_origin = ev_origin + and con_received = ev_data3)) + then + raise exception ''Slony-I: set % has subscriptions in progress - cannot merge'', + p_add_id; + end if; + + -- ---- -- Create a SYNC event, merge the sets, create a MERGE_SET event -- ---- perform @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''SYNC'', NULL); Index: test_5_subscribe =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/ducttape/test_5_subscribe,v retrieving revision 1.2 retrieving revision 1.3 diff -Lsrc/ducttape/test_5_subscribe -Lsrc/ducttape/test_5_subscribe -u -w -r1.2 -r1.3 --- src/ducttape/test_5_subscribe +++ src/ducttape/test_5_subscribe @@ -33,7 +33,7 @@ echo '***** Subscribe set received on origin - issue SYNC'; sync (id = 1); echo '***** Waiting for SYNC to be done on subscriber'; - wait for event (origin = 1, confirmed = 2); + wait for event (origin = 1, confirmed = 2, wait on = 1); echo '***** Subscription complete'; _EOF_
- Previous message: [Slony1-commit] By wieck: Added a safety check that prevents MERGE SET while subscribes
- Next message: [Slony1-commit] By cbbrowne: Documentation modifications to address the recent change to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list