Re: Postgres HA - Mailing list pgsql-admin

From Rui DeSousa
Subject Re: Postgres HA
Date
Msg-id 44BD5CED-CA02-458D-B84E-133BCD9F6DE0@icloud.com
Whole thread Raw
In response to Postgres HA  (Azimuddin Mohammed <azimeiu@gmail.com>)
List pgsql-admin
There are many different solutions; but I would recommend and use a least a three node cluster using synchronous
replicationwhere one of the nodes is acting as the witness — at a minimum (actual have more replicas).  The witness
nodeneed not be a full Postgres instance; it can also be achieved by using pg_recievexlog as the witness instead.  This
setupavoids a the split brain situation by making sure there is only one writable instance and that is the one that the
witnessis following. 

I use CARP (Common Address Redundancy Protocol) to manage the HA IP address (very platform specific); when the address
flipsover to a replica it automatically promotes the replica and witness follows the HA address thus signing off on the
selfpromotion. 

The old primary then needs to be reconfigured as a replia which can be done using pg_rewind or other numerous other
solutions;i.e. snapshots, backup, etc. 

I have not personally used this solution; but you could look at 2ndQuadrant repmgr product if you’re looking a packaged
solution.

https://www.2ndquadrant.com/en/resources/repmgr/installation-instructions/




pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Postgres HA
Next
From: "Jehan-Guillaume (ioguix) de Rorthais"
Date:
Subject: Re: Postgres HA