Re: How to recovery failed master after failover - Mailing list pgsql-general

From Michael Paquier
Subject Re: How to recovery failed master after failover
Date
Msg-id CAB7nPqSKwviD_XvxzDtHs=Wfn0MKhv=KMEEugR2DPTCiHDJh8Q@mail.gmail.com
Whole thread Raw
In response to Re: How to recovery failed master after failover  (leo <dazhoufei@gmail.com>)
Responses Re: How to recovery failed master after failover  (leo <dazhoufei@gmail.com>)
List pgsql-general
On Tue, Mar 4, 2014 at 6:26 PM, leo <dazhoufei@gmail.com> wrote:
> I wonder how to quickly recovery failed master? If I directly startup the
> failed master as slave ( assign proper parameter), is there any problem?
Yep, if the master has got ahead of the slave in term of WAL replay
where WAL forked after the slave promotion, you won't be able to
reconnect an old master as a slave. In this case, what you need to do,
is either to rewind the old master using for example pg_rewind (which
is not a tool part of Postgres core) or create a new node from scratch
with a base backup and some archives, and then reconnect it. Depending
on the size of data in server, this could take some time because of
network latency and if you create a new base backup, especially if
both nodes are on different (distant?) servers.
--
Michael


pgsql-general by date:

Previous
From: Venkata Balaji Nagothi
Date:
Subject: Re: log_statement per table
Next
From: leo
Date:
Subject: Re: How to recovery failed master after failover