Zhidong She zhidong.she at gmail.com
Tue Dec 21 23:45:10 PST 2010
Hi all,

We are using slonyI 2.0.5 to build our master/slave postgres HA solution for
our project. So far slonyI works fine except for a strange getlocalnodeid
issue. Could somebody please help to figure me out?

The scenario is, we have host A as master (define as node 1 in slonic), host
B (node 2) as slave at beginning. The data was replicated to host B from A
by slony.
Then we stop postgres on host A, and in host B run failover command and drop
node A from cluster. Thus the db service was switch to host B.

Establish a connection to host B via psql, and execute "select
_cluster.getlocalnodeid('_cluster')", it returns 2. Keep this connection for
a while.

So far everything is good.

Stop all slon process on host A and B.
Then start the postgres server on host A, and in both host A and host B,
execute "drop schema _cluster cascade" to clean all the cluster information.

Build the cluster again, this time host B as master (node 1), host A as
slave (node 2), and start the slon in both nodes.

Setup a new connection to host B and execute same "select
_cluster.getlocalnodeid('_cluster')", it returns 1.
But in the old connection we kept before, this command still return 2. At
the same time, in old connection, the update/insert/delete operation can not
be synchronized to host A.
It's strange that the cluster is rebuilt and slon is restarted but why only
old connection the localnodeid is still 2 and can not be resynchronized?

Anyone idea?

Thanks very much for your time!

Br,
Zhidong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20101222/0f9293ea/attachment.htm 


More information about the Slony1-general mailing list