Re: hot standby PSQL 9.1 Windows 2008 Servers - Mailing list pgsql-hackers

From Robert Haas
Subject Re: hot standby PSQL 9.1 Windows 2008 Servers
Date
Msg-id CA+Tgmoa_rsqwqOyOryq-cGzi5TAJiJJxeJ2=0xOn=AWUxbywNg@mail.gmail.com
Whole thread Raw
In response to Re: hot standby PSQL 9.1 Windows 2008 Servers  (chinnaobi <chinnaobi@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: empty backup_label
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] lock_timeout and common SIGALRM framework