Tory M Blue tmblue at gmail.com
Sun Oct 9 19:55:06 PDT 2016
On Sun, Oct 9, 2016 at 6:03 PM, Steve Singer <steve at ssinger.info> wrote:

> On Sun, 9 Oct 2016, Tory M Blue wrote:
>
>
> I currently have a setup like this
>>
>> Node:
>> 1  primary
>> 2  secondary
>> 3 query
>> 4 query
>> 5 query
>> 11 secondary
>> 12 secondary
>> 13 query
>> 14 query
>> 15 query
>>
>> Replication is like this
>>
>> Masternode=1
>>
>> 1 -> 2
>> 2 -> 11 3 4 5
>> 11 -> 12
>> 12 -> 13 14 15
>>
>> I'm going to switchover between 1 and 11
>>
>> So switchover would mean node 1 becomes secondary and node 11 becomes
>> primary.  However as noted above
>> currently 2 is talking to 11, 1 is not replicating directly to 11 as 2 is
>> doing the wide area replication
>> to 11..
>>
>> So do I have to subscribe 11 to node 1 prior to trying this switchover?
>> How is switchover handled if I
>> don't , since data in 2 could not be 100% up to date (1000ms delay) when
>> the command is triggered, so 1
>> would have to finish it's replication to 2 and 2 to 11, before 1 gave the
>> sets to 11?
>>
>
> I recommend running move set with a preamble containing admin conninfo to
> all your nodes. That way auto wait for can do its thing.
>
> Most of your questions are answered in
> http://www.slony.info/documentation/2.2/stmtmoveset.html
>
> Move set will reverse the subscription chain between 2 and 11, so 11->2
> 11->1
>
> If after your move set completes you can make further changes to your
> subscription network with
> http://www.slony.info/documentation/2.2/stmtresubscribenode.html
>
>
>
>> Also when I tear down the primary site (completely) how do I move,
>> promote, migrate the masternode (right
>> now the config sees the masternode as 1, but when I drop 1-5 at some
>> point from 11/12, I don't have a
>> masternode 1 anymore, so how do I configure the system to treat 11 as
>> masternode?
>>
>
> Once your move set completes node 11 is your master node(for those tables)
> that is exactly what move set does, it makes node 11 the origin(master).
>
> Slony does not support renaming node, don't try to make some other node in
> the cluster be renamed to node 1 after this.
>
> I encourage you to setup a test/staging cluster in your configuration and
> try various scenarios out before executing the commands on your production
> cluster.
>
> Steve
>
> Thanks
>> Tory
>>
>>
>>
Thanks Steve,

i've done all this quite a few times, switchovers and moving sets. But I
was not 100% sure if I could just go from 1-11 when 2 was replicating to
11.  Earlier today I went a head and did some moving so that 1 is
replicating to 11, so the switchover will be as clean as moving sets to 11
and 1 will become the secondary, just to make sure I didn't introduce any
weirdness.

And thanks for the heads up on the masternode. I would never try to rename
anything inside the cluster, but since our scripts all require a masternode
switch, I was not 100% sure that the masternode was in fact just the
primary db at that time

Thanks again for taking the time!!

Tory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20161009/86f3095e/attachment.htm 


More information about the Slony1-general mailing list