Julian Scarfe julian
Sun May 1 09:24:43 PDT 2005
For cluster T1 configured as simple master/slave I've been using:

select "_T1".getlocalnodeid('_T1') = (select set_origin from "_T1".sl_set 
where set_id = 1)

to give me a boolean result for whether I'm on the master node for set 1. If 
there's a better way I'd like to know, but it seems to work fine.

However, after a failover, there's a problem.  Both nodes think they're the 
master node according to the criteria above, because the old master hasn't 
received the news of his demotion.  Is there a simple way of working out on 
the "abandoned" node that it has indeed been abandoned?

In a sense, I realise it should never come to that:  if I can connect to the 
database on the old master, I should have used "move set" not "failover", 
and if I can't connect, I might as well pull the plug on it.  But there are 
situations in which the old master node might become available again before 
I get a chance to reconfigure it, so I'd like the client to be able to tell 
that it has been abandoned and that it should use a different node.

Thanks

Julian Scarfe 




More information about the Slony1-general mailing list