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