Re: [GENERAL] cluster question - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: [GENERAL] cluster question
Date
Msg-id 0f9af7d9-76e1-cddf-3889-127484f8f59c@a-kretschmer.de
Whole thread Raw
In response to Re: [GENERAL] cluster question  (Alex Samad <alex@samad.com.au>)
Responses Re: [GENERAL] cluster question  (Alex Samad <alex@samad.com.au>)
List pgsql-general

Am 15.08.2017 um 05:15 schrieb Alex Samad:
> Hi
>
> Quick question.  I have a 2 node cluster - each node has its own ip.
>
> But from reading this, I really need a 3rd ip, which potentially
> floats between the nodes to which ever is the master / rw node.
>
> Is that right? Sort of makes sense I guess
>

That's one way to solve that problem. If you are using repmgr/repmgrd
you can call own commands on events like failover. And, if you are using
pgbouncer or connection-pooling you can change the config for pgbouncer
(redefine the databases and there connection strings) and reload
pgbouncer. You can do that with the event-notification commands defined
in your repmgr-config.
Other solution: with some Java-drivers you can define several databases
and checks (if the database read-only or rw), the next PostgreSQL 10
will offer a similar feature.

PS.: please don't top-posting.


Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



pgsql-general by date:

Previous
From: Alex Samad
Date:
Subject: Re: [GENERAL] cluster question
Next
From: Daryl Stultz
Date:
Subject: [GENERAL] Corrupt index