From: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
---|---|
To: | Shoaib Mir <shoaibmir(at)gmail(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Hot Standby switchover |
Date: | 2010-06-22 09:08:02 |
Message-ID: | 87vd9bph8t.fsf@hi-media-techno.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Shoaib Mir <shoaibmir(at)gmail(dot)com> writes:
> Now Hot-Standby is setup like this...
>
> A --> B
> A --> C
>
> Now if I will like to do a switch so as to make B the new master and have my replication look like this:
>
> B --> C
> B --> A
>
> Where are the steps I need for doing so?
First, you need a common archive somewhere all the 3 servers can read
it, and you need to setup the restore_command so that you can use it.
Now, you can change the primary_conninfo on C so that it connects to
B. I guess that means a restart. Note that you only want to do that once
server B is the new master, so has been triggered as such. That means a
change of TimeLine, though, so it'll break streaming : that's when you
need to read the WALs from the archive, with the restore_command.
Then, to have the old master A a slave of the new master B, you need to
do a full slave setup here, with base backup and all.
I hope we will be able to get cascading support in 9.1 or before so that
it's possible to simplify all this by having a "relay" server in the
mix, so that you only talk to this one when changing the master.
Of course enabling the old master as a slave would still need a full
setup from scratch. There has been thoughts on how to bypass the base
backup there on -hackers, rather promising, but I don't know of any work
having been done yet. Guys are getting 9.0 out the door for now :)
Regards,
--
dim
From | Date | Subject | |
---|---|---|---|
Next Message | venkat | 2010-06-22 10:48:48 | How to Insert and retrieve multilingual (Hindi "an Indian language") into PostgreSQL |
Previous Message | Dimitri Fontaine | 2010-06-22 08:58:05 | Re: High Availability with Postgres |