Re: streaming replication and recovery - Mailing list pgsql-general

From Anupama Ramaswamy
Subject Re: streaming replication and recovery
Date
Msg-id 1397518489.59027.YahooMailNeo@web160305.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: streaming replication and recovery  (Michael Paquier <michael.paquier@gmail.com>)
List 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 by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Approach to Data Summary and Analysis
Next
From: Anupama Ramaswamy
Date:
Subject: Re: streaming replication + wal shipping