Re: BDR - Failure of Primary Server - How to recover?

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: cchee-ob <carter(dot)chee(at)objectbrains(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: BDR - Failure of Primary Server - How to recover?
Date: 2015-06-08 02:37:23
Message-ID: CAMsr+YGaPyM0LeRw7xPMyda0UtrFKL2Dz3WeFu_iyyfB3kE7VQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5 June 2015 at 23:32, cchee-ob <carter(dot)chee(at)objectbrains(dot)com> wrote:

> If my Primary Server in a BDR environment fails what is my recourse for
> recovery? My servers are in the cloud so I don't have control over IP
> address assignment either. This hasn't happen but I need to present a plan
> if our Production system has this occur.
>

You switch to writing to the secondary, presuming that you're not already
doing so (it's multi-master), stop writing to the old primary, and remove
the old primary using bdr.bdr_part_by_node_names(...).

Data that was committed to the old primary but not yet replicated is lost;
if you can't deal with that you'll need synchronous replication.

I would be more inclined to use normal streaming replication and hot
standby for a simple master/replica failover scenario, though UDR (or BDR
in subscribe mode) is becoming quite useful for this use case too. If you
don't need multi-master, don't use multi-master.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2015-06-08 06:52:57 Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Previous Message Serge Fonville 2015-06-07 08:00:54 Re: SQL Server access from PostgreSQL