CVS User Account cvsuser
Fri Jul 15 16:21:09 PDT 2005
Log Message:
-----------
Bug #1362 - subscribeSet() must check that the provider itself is a
forwarding subscriber

As checked into HEAD...

Change subscribeSet() to validate that the provider is either the origin
or a forwarding active subscriber

Tags:
----
REL_1_1_STABLE

Modified Files:
--------------
    slony1-engine/src/backend:
        slony1_funcs.sql (r1.64 -> r1.64.2.1)

-------------- next part --------------
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.64
retrieving revision 1.64.2.1
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.64 -r1.64.2.1
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -3817,6 +3817,20 @@
 
 
 	-- ---
+	-- Verify that the provider is either the origin or an active subscriber
+	-- Bug report #1362
+	-- ---
+	if v_set_origin <> p_sub_provider then
+		select 1 into v_rec from @NAMESPACE at .sl_subscribe
+			where sub_set = p_sub_set and 
+                              sub_receiver = p_sub_provider and
+			      sub_forward and sub_active;
+		if not found then
+			raise exception ''Slony-I: provider % is not an active forwarding node for replication set %'', p_sub_provider, p_sub_set;
+		end if;
+	end if;
+
+	-- ---
 	-- Check to see if the set contains any tables - gripe if not - bug #1226
 	-- ---
 	if not exists (select true 


More information about the Slony1-commit mailing list