cnpg: enable preferred sync replication on 2-instance clusters #15

Merged
k.renner merged 1 commits from fix/cnpg-sync-replication into master 2026-06-13 10:12:32 +00:00
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -23,6 +23,16 @@ spec:
parameters:
shared_buffers: "256MB"
max_connections: "400"
# Async replication makes CNPG switchover slow because the standby has
# to chase missing WAL via barman-cloud and replay queued records
# before it can promote. With one synchronous standby, the standby is
# always at the same LSN as the primary at commit time, so promote is
# near-instant. `dataDurability: preferred` falls back to async if the
# standby is down so writes don't block on standby unavailability.
synchronous:
method: any
number: 1
dataDurability: preferred
resources:
requests:
cpu: 200m
+5
View File
@@ -23,6 +23,11 @@ spec:
parameters:
shared_buffers: "256MB"
max_connections: "200"
# See ak-pg cluster.yaml for the rationale on synchronous replication.
synchronous:
method: any
number: 1
dataDurability: preferred
resources:
requests:
cpu: 200m