I'm having trouble dropping and re-creating a node. I'm trying to develop some scripts that will handle a failover situation and the subsequent cleanup. When dropping a node, here's what I'm doing:
slonik <<_EOF_ cluster name = global_cluster; node 1 admin conninfo = 'dbname=global host=host1 user=postgres'; node 2 admin conninfo = 'dbname=global host=host2 user=postgres'; uninstall node (id = 2); _EOF_ ... drop the slave database ... recreate the slave database schema slonik <<_EOF_ cluster name = global_cluster; node 1 admin conninfo = 'dbname=global host=host1 user=postgres'; node 2 admin conninfo = 'dbname=global host=host2 user=postgres'; store node (id=2, comment = '$SLAVE_NAME'); store path (server = 1, client = 2, conninfo='dbname=global host=$MASTER_NAME user=postgres'); store path (server = 2, client = 1, conninfo='dbname=global host=$SLAVE_NAME user=postgres'); subscribe set ( id = 1, provider = 1, receiver = 2, forward = no); _EOF_ When I do this, I get the following error message: <stdin>:4: PGRES_FATAL_ERROR select "_global_cluster".storeNode(2, 'subversion', 'f'); select "_global_cluster".enableNode(2); - ERROR: Slony-I: node 2 is already active What step am I missing? The only way I've been able to drop/recreate a node is to destroy and recreate the entire Slony cluster (i.e. drop node 1 also, and recreate it). I'm sure there's a better way! Thanks, Craig _______________________________________________ Slony1-general mailing list [email protected] http://lists.slony.info/mailman/listinfo/slony1-general
