hapostgres / hapostgres/pg_auto_failover
Restart logic counts intended restarts as bad exit
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 142
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Starting a monitor and running the following command 5 times in a row, causes the monitor to exit:
```
PG_AUTOCTL_DEBUG=true pg_autoctl do service restart listener --pgdata monitor
```
It exits with this log:
```
12:21:53 24163 FATAL pg_autoctl service listener has already been restarted 5 times in the last 10 seconds, stopping now
12:21:53 24167 INFO Postgres controller service received signal SIGTERM, terminating
12:21:53 24167 INFO Stopping pg_autoctl postgres service
12:21:53 24167 INFO /home/jelte/.pgenv/pgsql/bin/pg_ctl --pgdata /home/jelte/work/pg_auto_failover/monitor --wait stop --mode fast
12:21:54 24163 FATAL Something went wrong in sub-process supervision, stopping now. See above for details.
12:21:54 24163 INFO Stop pg_autoctl
```
I think we count intended restarts as bad restarts for some reason.
Contributor guide
Assessment
This issue has not been assessed yet.