From: | Anupama Ramaswamy <anumr_0123(at)yahoo(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: streaming replication and recovery |
Date: | 2014-04-14 23:34:49 |
Message-ID: | 1397518489.59027.YahooMailNeo@web160305.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks so much. That clarifies.
-Anupama
On Monday, April 14, 2014 12:09 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
On Sat, Apr 12, 2014 at 3:12 PM, Anupama Ramaswamy <anumr_0123(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Anupama Ramaswamy | 2014-04-14 23:41:39 | Re: streaming replication + wal shipping |
Previous Message | Rob Sargent | 2014-04-14 22:34:53 | Re: Approach to Data Summary and Analysis |