"standby switchover": improve log messages and add new exit code

Previously, if an issue was encountered with the old primary, but user
provided -F/--force to have repmgr promote the standby anyway, repmgr
would exit with the log message "STANDBY SWITCHOVER is complete"
and exit code 0 (SUCCESS).

To better report this partial completion, repmgr will now emit the message
"STANDBY SWITCHOVER has completed with issues" (and a HINT to check preceding
log messages) and new exit code 22 (ERR_SWITCHOVER_INCOMPLETE).
This commit is contained in:
Ian Barwick
2018-01-31 10:25:15 +09:00
parent 92f4710ee2
commit 811d2a45bd
4 changed files with 100 additions and 12 deletions

View File

@@ -43,6 +43,6 @@
#define ERR_BARMAN 19
#define ERR_REGISTRATION_SYNC 20
#define ERR_OUT_OF_MEMORY 21
#define ERR_REJOIN_FAIL 22
#define ERR_SWITCHOVER_INCOMPLETE 22
#endif /* _ERRCODE_H_ */