hapostgres / hapostgres/pg_auto_failover
ERROR candidate-priority value 10 is not valid. Valid values are integers from 0 to 100 🧐
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 142
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Hi Folks,
I play around a bit with pg_auto_failover and try to set the `candidate-priority` for the node `db-3` but I always get an error, see below.
```
postgres@db-monitor:~$ pg_autoctl set node candidate-priority --name db-3 10
09:52:32 66930 ERROR candidate-priority value 10 is not valid. Valid values are integers from 0 to 100.
```
I'm not sure if I did something wrong or if is this just a bug.
### Infos about the System
```
postgres@db-monitor:~$ pg_autoctl get formation settings
Context | Name | Setting | Value
----------+---------+---------------------------+-------------------------------------------------------------
formation | default | number_sync_standbys | 1
primary | db-1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)'
node | db-1 | candidate priority | 50
node | db-2 | candidate priority | 50
node | db-3 | candidate priority | 50
node | db-1 | replication quorum | true
node | db-2 | replication quorum | true
node | db-3 | replication quorum | true
postgres@db-monitor:~$ pg_autoctl show state
Name | Node | Host:Port | TLI: LSN | Connection | Reported State | Assigned State
-----+-------+------------+----------------+--------------+---------------------+--------------------
db-1 | 1 | db-1:5432 | 1: 0/4020D28 | read-write | primary | primary
db-2 | 2 | db-2:5432 | 1: 0/4020D28 | read-only | secondary | secondary
db-3 | 3 | db-3:5432 | 1: 0/4020D28 | read-only | secondary | secondary
postgres@db-monitor:~$ pg_autoctl version
pg_autoctl version 2.0
pg_autoctl extension version 2.0
compiled with PostgreSQL 15.0 (Ubuntu 15.0-2.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit
compatible with Postgres 10, 11, 12, 13, and 14
```
Contributor guide
Assessment
This issue has not been assessed yet.