Re: streaming replication and recovery

Поиск
Список
Период
Сортировка
От Anupama Ramaswamy
Тема Re: streaming replication and recovery
Дата
Msg-id 1397518489.59027.YahooMailNeo@web160305.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: streaming replication and recovery  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Thanks so much. That clarifies.

-Anupama
On Monday, April 14, 2014 12:09 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Sat, Apr 12, 2014 at 3:12 PM, Anupama Ramaswamy <anumr_0123@yahoo.com> wrote:
> Lets suppose at this point there is 0 delivery lag but XXXX bytes of replay
> lag.
>
All your answers are here:
http://www.postgresql.org/docs/devel/static/warm-standby.html
"Standby mode is exited and the server switches to normal operation
when pg_ctl promote is run or a trigger file is found (trigger_file).
Before failover, any WAL immediately available in the archive or in
pg_xlog will be restored, but no attempt is made to connect to the
master."

> a) Will the replay complete before the standby stops replicating (because it
> sees the trigger file) ?
Any WAL available in the archives or pg_xlog will be replayed before
the failover.

> b) If I want to run this as new master and attach other secondaries to point
> to this master, can I do it soon after "touch /tmp/pgsql.failover" OR should
> I wait till the secondary has finished replaying all the delivered stream ?
You need to wait until all the WAL has been replayed, which is the
point where failover occurs.


> c) How do I know if the replay is over and it is ready for a standalone
> operation ?

"SELECT pg_is_in_recovery();" returns true if server is still
performing recovery operations.
--
Michael



В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Approach to Data Summary and Analysis
Следующее
От: Anupama Ramaswamy
Дата:
Сообщение: Re: streaming replication + wal shipping