Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- slony details
- --------------
- cluster name:mmcluster
- Hosts:
- 1. 192.168.75.10 - Global HQ
- 2. 192.168.45.10 - US Master
- 3. 192.168.55.10 - EU Master
- 4. 192.168.15.10 - AU Master
- Tables in Replication:
- 1. sales_us
- 2. sales_eu
- 3. sales_au
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- init cluster(id=1, comment = 'Master Node');
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- store node (id=2,COMMENT = 'Node US', EVENT NODE = 1 );
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- store node (id=3,COMMENT = 'Node EU', EVENT NODE = 1 );
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- store node (id=4,COMMENT = 'Node AU', EVENT NODE = 1 );
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- store path (server=1, client=2, conninfo='dbname=mm_demo host=192.168.75.10 port=5432 user=postgres');
- store path (server=2, client=1, conninfo='dbname=mm_demo host=192.168.45.10 port=5432 user=postgres');
- store path (server=1, client=3, conninfo='dbname=mm_demo host=192.168.75.10 port=5432 user=postgres');
- store path (server=3, client=1, conninfo='dbname=mm_demo host=192.168.55.10 port=5432 user=postgres');
- store path (server=1, client=4, conninfo='dbname=mm_demo host=192.168.75.10 port=5432 user=postgres');
- store path (server=4, client=1, conninfo='dbname=mm_demo host=192.168.15.10 port=5432 user=postgres');
- _EOF_
- start slon process on all nodes
- --------------------------------
- /opt/dbserver/slony206/bin/slon mmcluster 'dbname=mm_demo port=5432 user=postgres'
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- create set (id=1, origin=2, comment='sales_data_us_set');
- set add table (set id=1, origin=2, id=7, fully qualified name = 'public.sales_us', comment='sales_us_table');
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- create set (id=2, origin=3, comment='sales_data_eu_set');
- set add table (set id=2, origin=3, id=8, fully qualified name = 'public.sales_eu', comment='sales_eu_table');
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- create set (id=3, origin=4, comment='sales_data_au_set');
- set add table (set id=3, origin=4, id=9, fully qualified name = 'public.sales_au', comment='sales_au_table');
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- subscribe set (id=1, provider=2,receiver=1,forward=no);
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- subscribe set (id=2, provider=3,receiver=1,forward=no);
- _EOF_
- /opt/dbserver/slony206/bin/slonik <<_EOF_
- cluster name = mmcluster;
- node 1 admin conninfo = 'dbname=mm_demo host=192.168.75.10 port=5432 user=postgres';
- node 2 admin conninfo = 'dbname=mm_demo host=192.168.45.10 port=5432 user=postgres';
- node 3 admin conninfo = 'dbname=mm_demo host=192.168.55.10 port=5432 user=postgres';
- node 4 admin conninfo = 'dbname=mm_demo host=192.168.15.10 port=5432 user=postgres';
- subscribe set (id=3, provider=4,receiver=1,forward=no);
- _EOF_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement