Wed Aug 29 08:46:56 PDT 2007
- Previous message: [Slony1-general] Replicating multiple schemas
- Next message: [Slony1-general] Replicating multiple schemas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/29/07, Karl Hennig <karl_hennig at yahoo.com> wrote: > > 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. You seem to have mixed up databases and schemas: 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 =3D $CLUSTERNAME; > > node 1 admin conninfo =3D 'dbname=3DA host=3D$MASTERHOST user=3D$REPLICAT= IONUSER'; > > node 2 admin conninfo =3D 'dbname=3DA_slave host=3D$SLAVEHOST > user=3D$REPLICATIONUSER'; > > # new nodes 3 and 4 added for schema B > node 3 admin conninfo =3D 'dbname=3DB host=3D$MASTERHOST user=3D$REPLICAT= IONUSER'; > > node 4 admin conninfo =3D 'dbname=3DB_slave host=3D$SLAVEHOST > user=3D$REPLICATIONUSER'; Nodes 3 and 4 are not needed since both schemas are in the same database. # init... am I supposed to init a second cluster with the node ID for schema > B? > init cluster ( id=3D1, comment =3D 'Master Node for A'); > init cluster ( id=3D3, comment =3D 'Master Node for B'); > > create set (id=3D1, origin=3D1, comment=3D'schema A tables'); > # I put id=3D2 and origin=3D3 because schema B's set should come from nod= e #3 > create set (id=3D2, origin=3D3, comment=3D'schema B tables'); > > set add table ( > set id=3D1, > origin=3D1, > id=3D1, > fully qualified name =3D 'public.table1', > comment=3D'table1 in schema A' > ); > > set add table ( > set id=3D2, > origin=3D3, > id=3D1, > fully qualified name =3D 'public.table1', > comment=3D'table1 in schema B' > ); Both tables here are at the same schema (public). Just specify the schema in the set add table, eg. set add table ( set id=3D1, origin=3D1, id=3D1, fully qualified name =3D 'schemaA.table1', comment=3D'table1 in schema A' ); and set add table ( set id=3D2, origin=3D1, id=3D2, fully qualified name =3D 'schemaB.table1', comment=3D'table1 in schema B' ); Regards MP -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070829/= c4bcefe0/attachment.htm
- Previous message: [Slony1-general] Replicating multiple schemas
- Next message: [Slony1-general] Replicating multiple schemas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list