Mon Oct 30 06:46:21 PST 2006
- Previous message: [Slony1-commit] By cbbrowne: More notes on what slon does
- Next message: [Slony1-commit] By wieck: Added a safety check that prevents MERGE SET while subscribes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Added a safety check that prevents MERGE SET while subscribes
are in progress.
Jan
Tags:
----
REL_1_2_STABLE
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.sql (r1.98 -> r1.98.2.1)
slony1-engine/src/ducttape:
test_5_subscribe (r1.1.6.1 -> r1.1.6.2)
-------------- 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.98.2.1
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.98 -r1.98.2.1
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -2540,6 +2540,21 @@
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.1.6.1
retrieving revision 1.1.6.2
diff -Lsrc/ducttape/test_5_subscribe -Lsrc/ducttape/test_5_subscribe -u -w -r1.1.6.1 -r1.1.6.2
--- 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 cbbrowne: More notes on what slon does
- Next message: [Slony1-commit] By wieck: Added a safety check that prevents MERGE SET while subscribes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list