Raghav ragavendra.dba at gmail.com
Mon Jun 18 23:57:51 PDT 2012
Hi Steve,

Firstly, Thanks for all the help to my other thread I raised and helping me
in moving forward with my testing.
Am playing a bit with Slony these days on high end replication solutions.

Am using Slony-I 2.1.0, I followed the documentation for adding the node to
the existing replication, however when I try to subscribe the new node its
going into waiting. Am doing in localhost of same cluster with multiple
databases.

1. Create database
create database slave2;

2. Restore the master structure to slave2;

pg_dump -h localhost -s -p 5432 -d master | psql slave

3. Drop _myrep schema which copied by pg_dump to slave ( Note: This is not
documented, I suspect when we copy masterdb schema structure u also get the
_slonyschema as well. Which throw error as _slonyschema existing. Do we
really need master _slonyschema to new node ?)

psql -d slave -c "drop schema _myrep cascade;"

4. below is the script to add new node:

#!/bin/bash

slonik <<_eof_
cluster name = myrep;
node 1 admin conninfo='host=127.0.0.1 dbname=master user=postgres
port=5432';
node 2 admin conninfo='host=127.0.0.1 dbname=slave1 user=postgres
port=5432';
node 3 admin conninfo='host=127.0.0.1 dbname=slave2 user=postgres
port=5432';

store node (id = 3, event node = 1, comment = 'Slave2 Node For The Primary
postgres');

#Setting Store Paths ...
echo  'Stored all nodes in the slony catalogs';
store path(server = 1, client = 3, conninfo='host=127.0.0.1 dbname=master
user=postgres port=5432');
store path(server = 3, client = 1, conninfo='host=127.0.0.1 dbname=slave2
user=postgres port=5432');
_eof_

This goes fine..

5. When I do subscribe its going into waiting stage.

Subscribe script:

#!/bin/bash
# Subscribe node

slonik <<_eof_
cluster name = myrep;
node 1 admin conninfo='host=127.0.0.1 dbname=master user=postgres
port=5432';
node 2 admin conninfo='host=127.0.0.1 dbname=slave user=postgres port=5432';
node 3 admin conninfo='host=127.0.0.1 dbname=slave2 user=postgres
port=5432';

try { subscribe set (id = 1, provider = 1 , receiver = 3, forward = yes,
omit copy = false); } on error { exit 1; } echo  'Subscribed nodes to set
1';
_eof_

output of the subscribe node;
-bash-4.1$ ./new_node_subscribe-set.sh
waiting for events  (3,5000000001) only at (3,0) to be confirmed on node 1
waiting for events  (3,5000000001) only at (3,0) to be confirmed on node 1
waiting for events  (3,5000000001) only at (3,0) to be confirmed on node 1

I found the link which pointing to some bug. Correct me, how to achive this.

http://www.slony.info/bugzilla/show_bug.cgi?id=223


-- 
Regards
Raghav
Blog: htt://raghavt.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20120619/e06edab3/attachment.htm 


More information about the Slony1-general mailing list