Re: Failback with log shipping - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Failback with log shipping
Date
Msg-id m24ohsnpcp.fsf@hi-media.com
Whole thread Raw
In response to Failback with log shipping  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Failback with log shipping
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Assuming controlled shutdown and that the standby received all WAL from the
> old master before it was promoted, I think you can simply create a
> recovery.conf in the old master's data directory to turn it into a standby
> server, and restart. Am I missing something?

Would that mean that a controlled restart of the old master so that the
recovery stops before applying the logs that were not shipped to the
slave would put it in the same situation?

How easy is it to script that? It seems all we need is the current XID
of the slave at the end of recovery. It should be in the log, maybe it's
easy enough to expose it at the SQL level…

Regards,
--
dim


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Specification for Trusted PLs?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Failback with log shipping