On Tue, May 22, 2012 at 12:15 PM, chinnaobi <chinnaobi@gmail.com> wrote:
> You mean when the primary which is going to switch its role to standby might
> not have sent all the WAL records to the standby and If it is switched to
> standby it has more WAL records than the standby which is now serves as
> primary. Is it ??
Yes, that is possible. Or the standby might have received all the WAL
records but not be caught up in terms of replaying them.
> It is actually the standby server which has to be restored from archive when
> it is switching to primary right .. Not the primary which is switching to
> standby ??
If you want to promote a standby, you can just do it (pg_ctl promote).If you have a master that you want to demote to a
standby,you've got
to resync it to whatever the current master is. I understand repmgr
has some tooling to help automate that, although I have not played
with it myself. In any event rsync can be a big help in reducing the
resync time.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company