Skip to content

Commit

Permalink
Update 'no_master' option to 'no_leader' in support of Patroni V4
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmoore4 committed Dec 20, 2024
1 parent 9580ee5 commit a01d26a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/patroni/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func instanceYAML(
postgresql[pgBackRestCreateReplicaMethod] = map[string]any{
"command": strings.Join(quoted, " "),
"keep_data": true,
"no_master": true,
"no_leader": true,
"no_params": true,
}
methods = append([]string{pgBackRestCreateReplicaMethod}, methods...)
Expand Down
2 changes: 1 addition & 1 deletion internal/patroni/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ acquiring the leader lock, the Patroni leader:
| - | postgresql.basebackup | Yes | mutable | either | List of arguments to pass to pg_basebackup when using the `basebackup` replica method.
| - | postgresql.{method}.command | Yes¹ | mutable | either | Command to execute for this replica method.
| - | postgresql.{method}.keep_data | Yes¹ | mutable | either | Whether or not Patroni should empty the data directory before. (default: false)
| - | postgresql.{method}.no_master | Yes¹ | mutable | either | Whether or not Patroni can call this method when no instances are running. (default: false)
| - | postgresql.{method}.no_leader | Yes¹ | mutable | either | Whether or not Patroni can call this method when no instances are running. (default: false)
| - | postgresql.{method}.no_params | Yes¹ | mutable | either | Whether or not Patroni should pass extra arguments to the command. (default: false)
||
|||||| https://github.com/zalando/patroni/blob/v2.0.1/docs/replica_bootstrap.rst#bootstrap
Expand Down
2 changes: 1 addition & 1 deletion internal/patroni/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ postgresql:
command: '''bash'' ''-ceu'' ''--'' ''install --directory --mode=0700 "${PGDATA?}"
&& exec "$@"'' ''-'' ''some'' ''backrest'' ''cmd'''
keep_data: true
no_master: true
no_leader: true
no_params: true
pgpass: /tmp/.pgpass
use_unix_socket: true
Expand Down

0 comments on commit a01d26a

Please sign in to comment.