Tue Aug 28 17:16:07 PDT 2007
- Previous message: Packaging for FreeBSD (was Re: [Slony1-general] Slony-I 1.2.11 released)
- Next message: [Slony1-general] Replicating multiple schemas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, I'm setting up slony to replicate multiple schemas from a single master DB to a single slave DB. I successfully got one schema to replicate but am having trouble with the second one. Here's how it's set up: DB Server #1 (master): holds schema A and schema B DB Server #2 (slave): holds schema A and schema B Schema A is replicating as expected but nothing is replicated for schema B. I tried modifying the tutorial slonik input to add schema B as follows: cluster name = $CLUSTERNAME; node 1 admin conninfo = 'dbname=A host=$MASTERHOST user=$REPLICATIONUSER'; node 2 admin conninfo = 'dbname=A_slave host=$SLAVEHOST user=$REPLICATIONUSER'; # new nodes 3 and 4 added for schema B node 3 admin conninfo = 'dbname=B host=$MASTERHOST user=$REPLICATIONUSER'; node 4 admin conninfo = 'dbname=B_slave host=$SLAVEHOST user=$REPLICATIONUSER'; # init... am I supposed to init a second cluster with the node ID for schema B? init cluster ( id=1, comment = 'Master Node for A'); init cluster ( id=3, comment = 'Master Node for B'); create set (id=1, origin=1, comment='schema A tables'); # I put id=2 and origin=3 because schema B's set should come from node #3 create set (id=2, origin=3, comment='schema B tables'); set add table ( set id=1, origin=1, id=1, fully qualified name = 'public.table1', comment='table1 in schema A' ); set add table ( set id=2, origin=3, id=1, fully qualified name = 'public.table1', comment='table1 in schema B' ); store node (id=2, comment = 'Slave node for A'); store path (server = 1, client = 2, conninfo='dbname=A host=$MASTERHOST user=$REPLICATIONUSER'); store path (server = 2, client = 1, conninfo='dbname=A_slave host=$SLAVEHOST user=$REPLICATIONUSER'); store listen (origin=1, provider = 1, receiver =2); store listen (origin=2, provider = 2, receiver =1); store node (id=4, comment = 'Slave node for B'); store path (server = 3, client = 4, conninfo='dbname=B host=$MASTERHOST user=$REPLICATIONUSER'); store path (server = 4, client = 3, conninfo='dbname=B_slave host=$SLAVEHOST user=$REPLICATIONUSER'); store listen (origin=3, provider=3, receiver=4); store listen (origin=4, provider=4, receiver=3); Then I execute the following commands: # note I put the same cluster name for both -- I don't know what it should be slon $CLUSTERNAME "dbname=A user=$REPLICATIONUSER host=$MASTERHOST" slon $CLUSTERNAME "dbname=A_slave user=$REPLICATIONUSER host=$SLAVEHOST" slon $CLUSTERNAME "dbname=B user=$REPLICATIONUSER host=$MASTERHOST" slon $CLUSTERNAME "dbname=B_slave user=$REPLICATIONUSER host=$SLAVEHOST" Then I start replicating with the following slonik input, modified from the tutorial: cluster name = $CLUSTERNAME; node 1 admin conninfo = 'dbname=A host=$MASTERHOST user=$REPLICATIONUSER'; node 2 admin conninfo = 'dbname=A_slave host=$SLAVEHOST user=$REPLICATIONUSER'; node 3 admin conninfo = 'dbname=B host=$MASTERHOST user=$REPLICATIONUSER'; node 4 admin conninfo = 'dbname=B_slave host=$SLAVEHOST user=$REPLICATIONUSER'; subscribe set ( id = 1, provider = 1, receiver = 2, forward = no); subscribe set ( id = 2, provider = 3, receiver = 4, forward = no); I'm obviously doing something wrong because only A is being replicated to A_slave. Is it possible to set up multiple-schema replication? Thanks for any help. ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
- Previous message: Packaging for FreeBSD (was Re: [Slony1-general] Slony-I 1.2.11 released)
- Next message: [Slony1-general] Replicating multiple schemas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list