From: John Scalia <jayknowsunix@gmail.com>
To: Wei Shan <weishan.ang@gmail.com>
To: Jan Lentfer <Jan.Lentfer@web.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Maximum Availability Architecture(MAA) for PostgreSQL
Date: Wed, 08 Apr 2015 12:39:01 -0400
Message-ID: <552559A5.2000603@gmail.com> (raw)
In-Reply-To: <CAFe9ZTqVU7+JV8AM7uAGy3DKxHXQ3d-k2VofK==zB73c74axHA@mail.gmail.com>
References: <CAFe9ZTo5z6mCH9p3eUO-wpKFcKioHdfd9OjLDj-2N6NUM_twew@mail.gmail.com>
<3f89a3e198877cffec4b544a9fc0e033@imap.lan.net>
<CAFe9ZTqVU7+JV8AM7uAGy3DKxHXQ3d-k2VofK==zB73c74axHA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
I probably should have said WAL archiving, but this is the act of sending the WAL segments to a standby server. Technically, using synchronous streaming setup, this is not really
required, but it's still a good insurance policy, especially if for whatever reason, the standby loses its connection to the primary. Also, synchronous streaming replication uses a
walreceiver process to send transactions, one at a time, to the standby servers. This is not the act of shipping a WAL segment to that standby, but if you're still sending them to
that standby, then when connectivity is restored, the standby can effectively catch back up to the primary. This is one of the major improvements in V9.4.x where the primary keeps
track of the segments and you no longer have to guess how many to keep on your primary in the event of connectivity loss. In 9.3.x and below, you had tell PostgreSQL how long to
hang onto WAL segments and guess correctly that this would be longer than any outage.
On 4/8/2015 11:35 AM, Wei Shan wrote:
> Hi Jay,
>
> I totally agree with you that having a pair hot standbys will be good. What do you mean by "using WAL shipping in addition to WAL receivers"?According to the documentation
> <http://www.postgresql.org/docs/current/static/warm-standby.html;, if I configure replication slot, "/the master does not remove WAL segments until they have been received by
> all standbys/". In sync replication, if the standby is down, the transaction will not be able to commit. However, if we have a pair, as long as 1 of the hot standby is up, the
> transaction will still go through.
>
> Hi Jan,
>
> Technically, 2 instance of pg-pool will suffice. However, if we have to bring 1 instance down for maintenance, there's no standby if the master crashes.
>
> Anyway, I do realise a tiny flaw in my design, pg-pool is not a active/active design. It means there's a wasted resource. At least my pair of hot standbys could serve read queries..
>
>
>
> On 8 April 2015 at 20:44, Jan Lentfer <Jan.Lentfer@web.de <mailto:Jan.Lentfer@web.de>> wrote:
>
> Am 2015-04-08 10:22, schrieb Wei Shan:
>
> In the PostgreSQL world, what do you guys think would be the
> equivalent?
>
> Attached is a diagram I have thought of. Clusters of pg-pool2 used to
> load balance the connection in and for connection failover when a DB
> crashes. Between master and slave, sync replication is being used for
> zero-data-loss.
>
>
> Why do you need 3 pg-pool instances? 2 instances uses watchdog should be sufficient?
> And if you plan to use sync replication you need to plan for 3 PostgreSQL Servers (a 3rd one that the sync replication can fail-over to).
>
> Regards,
>
>
> Jan
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org <mailto:pgsql-admin@postgresql.org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
>
>
>
> --
> Regards,
> Ang Wei Shan
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, weishan.ang@gmail.com, Jan.Lentfer@web.de
Subject: Re: Maximum Availability Architecture(MAA) for PostgreSQL
In-Reply-To: <552559A5.2000603@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