From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "Maeldron T(dot)" <maeldron(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Failback to old master |
Date: | 2014-10-29 16:46:55 |
Message-ID: | CA+TgmobFOwO8qp1X3n_gRqcGw1593y-ij3ybCO+U9FbPgyeuRQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 29, 2014 at 12:43 PM, Maeldron T. <maeldron(at)gmail(dot)com> wrote:
> Thank you, Robert.
>
> I thought that removing the recovery.conf file makes the slave master only
> after the slave was restarted. (Unlike creating the a trigger_file). Isn't
> this true?
Yes, but after the restart, the slave will also rewind to the most
recent restart-point to begin replay, and some of the sanity checks
that recovery.conf enforces will be lost during that replay. A safe
way to do this might be to shut down the master, make a note of the
ending WAL position on the master, and then promote the slave (without
shutting it down) once it's reached that point in replay.
> I also thought that if there was a crash on the original master and it
> applied WAL entries on itself that are not presented on the slave then it
> will throw an error when I try to connect it to the new master (to the old
> slave).
I don't think you're going to be that lucky.
> It would be nice to know as creating a base_backup takes much time.
rsync can speed things up by copying only changed data, but yes, it's a problem.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2014-10-29 16:49:02 | Re: Proposal: Log inability to lock pages during vacuum |
Previous Message | Robert Haas | 2014-10-29 16:43:59 | Re: Directory/File Access Permissions for COPY and Generic File Access Functions |