[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slony1-general
Subject:    Re: [Slony1-general] slonik_uninstall_nodes unsafe ?
From:       Christopher Browne <cbbrowne () ca ! afilias ! info>
Date:       2008-02-27 16:44:01
Message-ID: 60wsoqe4dq.fsf () dba2 ! int ! libertyrms ! com
[Download RAW message or body]

"lio bod" <liobod.slony@gmail.com> writes:
> 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?

The point is that this script will remove replication from your entire
cluster in one fell swoop.

If you run this unintentionally, it could be a Rather Bad Thing.

I recall a case back in 2004 where I did something similar, and it
went badly wrong; I had two replication sets, set #1 (consisting of
most of the data for one of our registries), and set #2 (where I was
trying to add in some more tables).

I "fat-fingered" a script, and did:
  slonik_drop_set set1
rather than
  slonik_drop_set set2

which meant I had to reconstruct replication of most of the data
across the whole cluster.

Based on your (not quite specific enough) description, I don't think
you likely need (or want) to drop out replication and start over; I
would think that you should be able to accomplish what you're trying
to do by issuing some SUBSCRIBE SET requests to change the shape of
the "tree" of replication configuration so that the new slave points
to the master, and could then DROP NODE to get rid of a now-unused
node.

Doing things that way means that you never lose the protections that
replication is supposed to provide.
-- 
output = ("cbbrowne" "@" "cbbrowne.com")
http://linuxfinances.info/info/rdbms.html
"Recursion is the root of computation since it trades description for time."
-- Alan J. Perlis
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic