pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Operating of synchronous master when no standby is available
Date: Mon, 2 Oct 2023 09:59:41 -0500
Message-ID: <2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@gmail.com> (raw)
In-Reply-To: <CABVQyeqYocamAL0y7eLPdYP-q96U4e-Kd+uPwro-hDgPa56y4Q@mail.gmail.com>
References: <CABVQyeqYocamAL0y7eLPdYP-q96U4e-Kd+uPwro-hDgPa56y4Q@mail.gmail.com>

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.

view thread (7+ messages)  latest in thread

Message-ID: <2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@gmail.com>
Permalink:  ../2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@gmail.com/
Also on:    postgresql.org/message-id/2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@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 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: ronljohnsonjr@gmail.com
  Subject: Re: Operating of synchronous master when no standby is available
  In-Reply-To: <2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@gmail.com>
  References: <CABVQyeqYocamAL0y7eLPdYP-q96U4e-Kd+uPwro-hDgPa56y4Q@mail.gmail.com> <2b33c1e3-3dc8-b312-3a0d-9a205cf872ce@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