pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL Replication
Date: Fri, 19 Feb 2021 18:35:45 +0100
Message-ID: <20210219173545.GF10464@hjp.at> (raw)
In-Reply-To: <CABZ-Guu7V_0EpGW9cSx3J2NagHwBaWXs3pe-6iqhRMr9ZtUoaA@mail.gmail.com>
References: <CABZ-GuuVThq5sX9v4T4CBFgUL+OHui1rh=o54RqWg9Q0PdqoxQ@mail.gmail.com>
	<CAN0zQZ6o3d2UrJ6RD6t8-gNwfN90KK3T0WW9C2fWN3++RaMjUw@mail.gmail.com>
	<5269d50b-3d30-d36b-a7a6-f54f34eeff57@gmail.com>
	<CABZ-Guu7V_0EpGW9cSx3J2NagHwBaWXs3pe-6iqhRMr9ZtUoaA@mail.gmail.com>

On 2021-02-17 12:22:50 +0300, Mutuku Ndeti wrote:
> I agree with you. Single master, with a standby replica, seems easier to
> manage. Is there a way to automatically promote the standby, when the active
> master fails?

Yes. There are several solutions. We use Patroni, which is simple to set
up and seems to "just work" (we routinely cause a failover every few
weeks and so far it has always worked fine). Patroni is quite
postgres-specific, though, so if you want to manage other applications,
too, you may want to look into more generic solutions.

> Is it feasible to have 2 instances of the application, writing onto
> the same DB, reason for two instances of the application is to allow
> for redundancy/load balancing. 

You can have any number of applications writing into the same database.
At some point you might exceed the capacity of your hardware, but that's
a function of load in general, not the number of applications.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (91+ messages)

Message-ID: <20210219173545.GF10464@hjp.at>
Permalink:  ../20210219173545.GF10464@hjp.at/
Also on:    postgresql.org/message-id/20210219173545.GF10464@hjp.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: PostgreSQL Replication
  In-Reply-To: <20210219173545.GF10464@hjp.at>
  References: <CABZ-GuuVThq5sX9v4T4CBFgUL+OHui1rh=o54RqWg9Q0PdqoxQ@mail.gmail.com> <CAN0zQZ6o3d2UrJ6RD6t8-gNwfN90KK3T0WW9C2fWN3++RaMjUw@mail.gmail.com> <5269d50b-3d30-d36b-a7a6-f54f34eeff57@gmail.com> <CABZ-Guu7V_0EpGW9cSx3J2NagHwBaWXs3pe-6iqhRMr9ZtUoaA@mail.gmail.com> <20210219173545.GF10464@hjp.at>

* 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