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.