Re: How to recovery failed master after failover

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: How to recovery failed master after failover
Дата
Msg-id CAB7nPqSKwviD_XvxzDtHs=Wfn0MKhv=KMEEugR2DPTCiHDJh8Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to recovery failed master after failover  (leo <dazhoufei@gmail.com>)
Ответы Re: How to recovery failed master after failover  (leo <dazhoufei@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Venkata Balaji Nagothi
Дата:
Сообщение: Re: log_statement per table
Следующее
От: leo
Дата:
Сообщение: Re: How to recovery failed master after failover