"Stéphane A. Schildknecht" stephane.schildknecht at postgresqlfr.org
Wed Feb 27 01:32:59 PST 2008
lio bod a écrit :
> Hello world,
>  
> I'm trying some procedures to modify a cluster : my need is to change
> the slave host (same base, same name, same model...) for a given master
> base master host.
>  
> I had a look on slonik_uninstall_nodes command and i wonder why the doc
> (http://www.slony.info/documentation/adminscripts.html) tells it is 'a
> /VERY/ unsafe script'
>  
> I'd like to know why it's supposed to be so unsafe?
>  
> Any better practice?
> Any best practice?
>  
> Thx,

It is unsafe because it drops all replication information from all nodes
involved. You then lose your replication network in a single operation. Be sure
it won't break your databases, but you will lose your replication.

If your need is to add a new slave and drop the old one, you'd better have a
look at bare-metal functions.

something like "select _INSTANCE.uninstallnode()" on the old slave should do
the work. You could also execute some drop node procedure on a "specific" node,
which is not, what the perl script you invoked does.

You could have a look at slonik_drop_node also. You just should verify twice
you will execute that script against the right node :-)

Regards,

-- 
Stéphane SCHILDKNECHT
Président de PostgreSQLFr
Tél. 09 53 69 97 12
http://www.postgresqlfr.org


More information about the Slony1-general mailing list