Mark Hagger mark.hagger
Thu Mar 16 06:03:59 PST 2006
Hi,

I've managed to get A replicating to B quite happily, but I'm having
trouble getting A -> B -> C.

Full scripts are attached, but basically I'm doing:

create set (id=1, origin=1, comment='Master');

set add table (set id=1, origin=1, id=1, fully qualified name =
'public.feed_details', comment='master feed_details table');


Starting the slon's on my 3 nodes

and then trying:


subscribe set ( id = 1, provider = 1, receiver = 2, forward = yes);

but when I try:

subscribe set ( id = 1, provider = 2, receiver = 3, forward = no);

It fails with:

ERROR:  Slony-I: provider 2 is not an active forwarding node for
replication set 1

I'm a little confused now, I would have thought the "forward=yes" on the
first subscribe makes it an active forwarding node?

I'm sure I'm missing something blindingly obvious, but trawls through
the docs haven't shown anything I can see.  Any comments/suggestions
welcome.

Thanks,

Mark


________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs SkyScan service.
-------------- next part --------------
slon $CLUSTERNAME "dbname=$MASTERDBNAME user=$REPLICATIONUSER host=$MASTERHOST" >& master.log &
slon $CLUSTERNAME "dbname=$WORK1DBNAME user=$REPLICATIONUSER host=$SLAVEHOST" >& work1.log &
slon $CLUSTERNAME "dbname=$WORK1SLAVEDBNAME user=$REPLICATIONUSER host=$SLAVEHOST" >& work1slave.log &

slonik <<_EOF_
    	 # ----
    	 # This defines which namespace the replication system uses
    	 # ----
    	 cluster name = $CLUSTERNAME;
    
    	 # ----
    	 # Admin conninfo's are used by the slonik program to connect
    	 # to the node databases.  So these are the PQconnectdb arguments
    	 # that connect from the administrators workstation (where
    	 # slonik is executed).
    	 # ----
    	 node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER';
    	 node 2 admin conninfo = 'dbname=$WORK1DBNAME host=$SLAVEHOST user=$REPLICATIONUSER';
    	 node 3 admin conninfo = 'dbname=$WORK1SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER';
    
    	 # ----
    	 # Node 2 subscribes set 1
    	 # ----
    	 subscribe set ( id = 1, provider = 1, receiver = 2, forward = yes);

    	 # ----
    	 # Node 3 subscribes set 2 from p2 and also set 1 from p2
    	 # ----
    	 subscribe set ( id = 1, provider = 2, receiver = 3, forward = no);
    	 subscribe set ( id = 2, provider = 2, receiver = 3, forward = no);
_EOF_

-------------- next part --------------
slonik <<_EOF_
    	#--
    	# define the namespace the replication system uses in our example it is
    	# slony_example
    	#--
    	cluster name = $CLUSTERNAME;
    
    	#--
    	# admin conninfo's are used by slonik to connect to the nodes one for each
    	# node on each side of the cluster, the syntax is that of PQconnectdb in
    	# the C-API
    	# --
    	node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER';
    	node 2 admin conninfo = 'dbname=$WORK1DBNAME host=$SLAVEHOST user=$REPLICATIONUSER';
    	node 3 admin conninfo = 'dbname=$WORK1SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER';
    
    	#--
    	# init the first node.  Its id MUST be 1.  This creates the schema
    	# _$CLUSTERNAME containing all replication system specific database
    	# objects.
    
    	#--
    	init cluster ( id=1, comment = 'Master Node');
     
    	#--
    	# Slony-I organizes tables into sets.  The smallest unit a node can
    	# subscribe is a set. 
    	# The master or origin of the set is node 1.
    	#--
    	create set (id=1, origin=1, comment='Master FeedDetails table');
    	set add table (set id=1, origin=1, id=1, fully qualified name = 'public.feed_details', comment='master feed_details table');
    
    	#--
    	# Create the second node (the slave) tell the 2 nodes how to connect to
    	# each other and how they should listen for events.
    	#--
    
    	store node (id=2, comment = 'Work1 node');
    	store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER');
    	store path (server = 2, client = 1, conninfo='dbname=$WORK1DBNAME host=$SLAVEHOST user=$REPLICATIONUSER');
    	store listen (origin=1, provider = 1, receiver =2);
    	store listen (origin=2, provider = 2, receiver =1);

        # --
        # Set for cascading feed details and replicating content data to underlying slave database
        # --
    	create set (id=2, origin=2, comment='WORK1 Tables');
    	set add table (set id=2, origin=2, id=2, fully qualified name = 'public.content_details', comment='content_details table');
    	set add table (set id=2, origin=2, id=3, fully qualified name = 'public.content_entry', comment='content_entry table');
    	set add table (set id=2, origin=2, id=4, fully qualified name = 'public.META1', comment='META1 table');

    	store node (id=3, comment = 'Work1Slave node');
    	store path (server = 2, client = 3, conninfo='dbname=$WORK1DBNAME host=$SLAVEHOST user=$REPLICATIONUSER');
    	store path (server = 3, client = 2, conninfo='dbname=$WORK1SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER');
    	store listen (origin=2, provider = 2, receiver =3);
    	store listen (origin=3, provider = 3, receiver =2);
_EOF_




More information about the Slony1-general mailing list