Re: hot standby PSQL 9.1 Windows 2008 Servers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: chinnaobi <chinnaobi(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: hot standby PSQL 9.1 Windows 2008 Servers
Date: 2012-06-26 16:11:21
Message-ID: CA+Tgmoa_rsqwqOyOryq-cGzi5TAJiJJxeJ2=0xOn=AWUxbywNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 22, 2012 at 12:15 PM, chinnaobi <chinnaobi(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-06-26 16:12:27 Re: [PATCH] lock_timeout and common SIGALRM framework
Previous Message Robert Haas 2012-06-26 16:05:29 Re: empty backup_label