Re: Operating of synchronous master when no standby is available

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Operating of synchronous master when no standby is available
Date: 2023-10-02 14:59:41
Message-ID: 2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/2/23 03:54, Sergey Cherukhin wrote:
> Hello!
>
> I use Postgresql+Pacemaker+Corosync cluster with 2 Postgresql instances in
> synchronous replication mode. When one of the nodes is down, clients hang
> on INSERT operations because the primary server waits until standby
> confirms that it got the data, but the standby node is down.
>
> I need clients to feel no difference when they operate with a fully
> operational cluster or with a degraded cluster containing primary node alone.

This is why we use async physical replication even with local HA clusters.

> Is it possible to configure synchronous replication to operate normally
> when primary and replica are online, but primary no waits confirmation
> from replica if replica is not connected?

Locally, async replication over Gbit (or faster) NICs will /probably/ be
Good Enough.  (I ran pgbench at loads that saturated all the CPUs and
inserted 100GB of data against a pgpool cluster -- pgpool VIP on one node,
primary database on the second node and replica on the third node -- and saw
no lag.)

--
Born in Arizona, moved to Babylonia.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wim Bertels 2023-10-02 15:21:33 Re: specifying multiple options in URI psql behaviour?
Previous Message Dominique Devienne 2023-10-02 14:42:15 How to force "re-TOAST" after changing STORAGE or COMPRESSION?