Skip site navigation (1) Skip section navigation (2)

Re: Failover of a Hot standby setup with multiple standbys

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Deepesh D <deep(dot)d2010(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Failover of a Hot standby setup with multiple standbys
Date: 2012-02-29 05:37:02
Message-ID: CAL_0b1tA5ZQUw4zqn-oHHjD9AFxHuvbAwrJzDDRTROX7=gWzdA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Tue, Feb 28, 2012 at 4:05 PM, Deepesh D <deep(dot)d2010(at)gmail(dot)com> wrote:
> Is it enough if I just change theĀ  'primary_conninfo' and 'restore_command'
> in both the slaves (S2,S3) to point to the new master S1?

Once I had such experience on 9.0.x and here is the note I made for myself:

To switch a replica to read from the new master after switching it
over add the following instruction in the recovery.conf on the
replica.

recovery_target_timeline = 'latest'

Then stop the service, resync the pg_xlog directory on the replica and
start it. Note that the old master must be stopped before switching
the new one over. It will prevent replicas from timeline divergence.

ps. I tried to adjust the x..xx.history file to avoid re-syncing
pg_xlog but without any success.

pps. BTW I still wonder if it is possible to avoid the re-syncing. May
be it could be done by setting restore_command?


-- 
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp

In response to

pgsql-admin by date

Next:From: Brian FehrleDate: 2012-02-29 15:14:45
Subject: Re: Hot standby having high requested checkpoints?
Previous:From: Fujii MasaoDate: 2012-02-29 04:22:33
Subject: Re: Hot standby having high requested checkpoints?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group