Richard Yen dba
Wed May 17 10:37:55 PDT 2006
Thanks!  That is quite an ingenious idea!

--Richard



On May 17, 2006, at 9:20 AM, Tim Goodaire wrote:

> On Tue, May 16, 2006 at 12:09:44PM -0700, Richard Yen wrote:
>> Hi all,
>>
>> Perhaps this is a very very dumb question, but I was wondering if
>> this would be possible, as it would be a very *clean* way for us to
>> do a switchover.
>>
>> I've got a cluster of machines, labeled db1, db2, and db3.  db1 is
>> master, and db2 and db3 are slaves.
>>
>> We're having segfault issues with postgres on db1, so we were
>> thinking about swapping the db1 and db3 machines to determine if it's
>> a hardware issue, to maintain reliable service while we figure out
>> what's wrong with the machine (if any), etc.
>>
>> I figure if I swap names and IP addresses on db1 and db3, then do
>> some sort of MOVE SET call, I'd only have to manipulate settings on 2
>> machines as opposed to more.
>>
>> The reason why I want do do this is because we've got 20+ other
>> machines that perform data manipulation on db1, and it would be quite
>> a messy task to have them all point to db3...might miss a few
>> machines....eek.
>>
>> I've tried to do this earlier, but to no avail.  Would anyone out
>> there know how to do this successfully?
>>
>> Here's what I tried (on a dev environment, of course):
>> Take db1 and db3 down
>> Swap names and IP addresses (reboot)
>> Change sl_path to have the right conninfo
>> Change sl_subscribe to point to the right origin
>> Restart slon
>> Do a MOVE SET
>>
>> Am I missing anything?
>>
>> Any help would be greatly appreciated...if this is not possible, I'll
>> just go ahead and change the settings on those 20+ machines
>
> If you do end up changing the settings on all of those machines, I  
> have a
> suggestion for you. Set up a name in your dns to point to the  
> origin database
> (eg. db_origin.yourdomain) and have the 20+ machines refer to that  
> name. Then
> when you hit a situation like this, you move set to the new origin  
> and make
> the change in your dns and all of your machines will be going to  
> the right
> place.
>
>>
>> Thanks!
>> --Richard
>> _______________________________________________
>> Slony1-general mailing list
>> Slony1-general at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/slony1-general
>
> -- 
> Tim Goodaire    416-673-4126    tgoodair at ca.afilias.info
> Database Administrator, Afilias Canada Corp.




More information about the Slony1-general mailing list