diff --git a/src/cluster.py b/src/cluster.py index c77d801375..492ba91437 100644 --- a/src/cluster.py +++ b/src/cluster.py @@ -629,7 +629,7 @@ def render_patroni_yml_file( stanza=stanza, restore_stanza=restore_stanza, version=self.get_postgresql_version().split(".")[0], - minority_count=self.planned_units // 2, + synchronous_count=self.planned_units - 1, pg_parameters=parameters, primary_cluster_endpoint=self.charm.async_replication.get_primary_cluster_endpoint(), extra_replication_endpoints=self.charm.async_replication.get_standby_endpoints(), diff --git a/templates/patroni.yml.j2 b/templates/patroni.yml.j2 index bd3f87154a..cf9b1b8dee 100644 --- a/templates/patroni.yml.j2 +++ b/templates/patroni.yml.j2 @@ -59,7 +59,7 @@ bootstrap: retry_timeout: 10 maximum_lag_on_failover: 1048576 synchronous_mode: true - synchronous_node_count: {{ minority_count }} + synchronous_node_count: {{ syncronous_count }} postgresql: use_pg_rewind: true remove_data_directory_on_rewind_failure: true