pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Scalia <jayknowsunix@gmail.com>
To: Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Cc: Azimuddin Mohammed <azimeiu@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: Postgres HA
Date: Fri, 5 Jan 2018 20:07:16 -0500
Message-ID: <A4616F90-BD93-4FEE-B2D8-016B3E59931C@gmail.com> (raw)
In-Reply-To: <20180105220042.0978d4c1@firost>
References: <CAKUuFd7x8FAg0V8+mStBeXcctpbykTz5uf0J0dtdEgfW9DL3Hg@mail.gmail.com>
	<20180105220042.0978d4c1@firost>

What he said, and you also may want to look at pgpool-II. I’ve had fairly good luck with that and Tatsuo (the author) hangs out here occasionally too.
—
Jay

Sent from my iPad

> On Jan 5, 2018, at 4:00 PM, Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr> wrote:
> 
> On Fri, 5 Jan 2018 13:07:10 -0600
> Azimuddin Mohammed <azimeiu@gmail.com> wrote:
> 
>> Hello,
>> I am little confused with how HA works in postgres. Reading the article
>> which state as below "*If the primary server fails and the standby server
>> becomes the new primary, and then the old primary restarts, you must have a
>> mechanism for informing the old primary that it is no longer the primary.
>> This is sometimes known as STONITH (Shoot The Other Node In The Head),
>> which is necessary to avoid situations where both systems think they are
>> the primary, which will lead to confusion and ultimately data loss.*
>> 
>> *Many failover systems use just two systems, the primary and the standby,
>> connected by some kind of heartbeat mechanism to continually verify the
>> connectivity between the two and the viability of the primary. It is also
>> possible to use a third system (called a witness server) to prevent some
>> cases of inappropriate failover, but the additional complexity might not be
>> worthwhile unless it is set up with sufficient care and rigorous testing.*
>> *PostgreSQL does not provide the system software required to identify a
>> failure on the primary and notify the standby database server. Many such
>> tools exist and are well integrated with the operating system facilities
>> required for successful failover, such as IP address migration."*
>> 
>> Can someone explain how the HA failback will take place
> 
> The failback need either to rebuild the old master as a standby (rsync,
> pg_basebackup, restore PITR, ...) or to use pg_rewind to rewind the old master
> to a point where it can catch up with the new master.
> 
> Some tools tries to automate failback using pg_rewind (patroni, repmgr), but I
> have no experience with them.
> 
>> and what open source tools we can use to make sure once the primary server
>> which failed over to slave will mark itself as slave.
> 
> There's a lot of open source tools to build some HA around PgSQL: Repmgr,
> Patroni (based on etcd or zookeeper), PAF (based on Pacemaker), etc. You will
> have to spend a lot of time to make extensive tests, understand them, pick one
> and document your cluster.
> 
> Regards,
> 




view thread (7+ messages)  latest in thread

Message-ID: <A4616F90-BD93-4FEE-B2D8-016B3E59931C@gmail.com>
Permalink:  ../A4616F90-BD93-4FEE-B2D8-016B3E59931C@gmail.com/
Also on:    postgresql.org/message-id/A4616F90-BD93-4FEE-B2D8-016B3E59931C@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jayknowsunix@gmail.com, ioguix@free.fr, azimeiu@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Postgres HA
  In-Reply-To: <A4616F90-BD93-4FEE-B2D8-016B3E59931C@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox