Re: Asynchronous streaming replication in postgresql - Mailing list pgsql-cluster-hackers

From Simon Riggs
Subject Re: Asynchronous streaming replication in postgresql
Date
Msg-id CA+U5nMJ0emE2E2uBGZ5k5KyJ1chy8T2d=-uRFmQ2BqSkpiq0xw@mail.gmail.com
Whole thread Raw
In response to Asynchronous streaming replication in postgresql  ("Deole, Pushkar (Pushkar)" <pdeole@avaya.com>)
Responses Re: Asynchronous streaming replication in postgresql
List pgsql-cluster-hackers
On 12 March 2015 at 05:56, Deole, Pushkar (Pushkar) <pdeole@avaya.com> wrote:

> I am new to postgreSql and evaluating the streaming replication for my use
> case. My use case is:
>
>
>
> 1.       Need to replicate data from primary database (master) to secondary
> database (slave) asynchronously.
>
> 2.       If master goes down, the slave should automatically be promoted to
> master.
>
> 3.       Later, when the original primary server (original master) is
> brought up again, it should obtain back its master role and the new master
> should assume the slave again as it was with original setup.
>
>
>
> For #1, the streaming replication of postgresql is good enough.
>
> For #2, we need to create the trigger file in slave. This can be done
> manually. How can we do this automatically?

Look at repmgr, it does what you need.

> For #3, this seems to be quite complicated. Is this possible using streaming
> replication and if yes then how can this be achieved?

Bad idea to do that automatically.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services


pgsql-cluster-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Asynchronous streaming replication in postgresql
Next
From: "Deole, Pushkar (Pushkar)"
Date:
Subject: Re: Asynchronous streaming replication in postgresql