Skip to content

Commit

Permalink
Set all nodes to synchronous replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Nov 14, 2024
1 parent 08ba852 commit bcafc87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion templates/patroni.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcafc87

Please sign in to comment.