Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9h7-0005If-1L for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 17:35:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lD9h5-0001Nf-9S for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 17:35:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9h5-0001NY-1f for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 17:35:55 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9gx-0002yb-66 for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 17:35:53 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 25EE144F6; Fri, 19 Feb 2021 18:35:45 +0100 (CET) Date: Fri, 19 Feb 2021 18:35:45 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL Replication Message-ID: <20210219173545.GF10464@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <5269d50b-3d30-d36b-a7a6-f54f34eeff57@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5Mfx4RzfBqgnTE/w" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5Mfx4RzfBqgnTE/w Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 act= ive > 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.=A0 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 --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --5Mfx4RzfBqgnTE/w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmAv9uwACgkQ8g5IURL+ KF3R2hAAofAoe4eNp5Pmk1BJ7LYSWY5FI1c51AeHCh2edJz9xr5pUwPfLTJBtLj/ hb4H1FctIZe3QBVBssyaSiFIyKI5rKH3k4OMx9ZMW/QqP1ylXx+JHbliiSFZN/rg lJCosoWv/fL50T30wuJYcnE7dCFJz1+TccO2xcOINiDXIBDexTKIaoo9q8cbP3iz OTNYAgZ92cACqz0zlN+qG+99zA0xWFHQRdE59W9gqzdXNo+veQK1ZF6J8iIZtH87 9F3hs20znG/3xg0MQ7kU31lGdKW4OPfe87T6yL8q1UInucOX45EUgv6aLdA0J1Hd 9dBc8Td4vTlv2lDKIrF1oOCDJIszisreuHoWRgz9+3low8heRqFBpj8iuiKuE307 72AtDahQw5BPEumUOXAeMVcPiMLqPtTxQHYEx/GYRsmCQl+MPtICfqPteTXr4Ntf m8Tnr1tCEFrqE1P8f0h4rEKkzLl0pUgPqTqPXGufYo3OQcCMa1uQbcxmm/mDKXYG N9lyNaFgPnqkIkxF1zMJ7izseJ3v4YwCypHVM+HNzJLMJ13eWbtpyXfP9JYFOWZ2 ewYGZhyCsGeFrXluPFWp/LehHHWTOcTYf1XekKvF/oau0gTA4DCNgyOhiiHVB61W zQ597jrwnA4xA3+AsA9fyhB3LEvX2WrYYhoVPXfnZxjPeWkBw/Q= =Cbc2 -----END PGP SIGNATURE----- --5Mfx4RzfBqgnTE/w--