repmgrd: activate inactive node record at startup

If a PostgreSQL instance was shut down while repmgrd was running, and
repmgrd was subsequently restarted (this chain of events could occur
during e.g. a server reboot), the node record will have been set to
"inactive". Previously, in this case repmgrd would refuse to start up.
However, as we can determine the node is running, it should normally
be no problem to automatically set the node record to "active".

The old behaviour can be restored by setting the new parameter
"repmgrd_exit_on_inactive_node" to "true".

RM19604.
This commit is contained in:
Ian Barwick
2021-07-12 17:38:40 +09:00
parent f64f498afb
commit 79d1f005db
10 changed files with 90 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
5.3.0 2021-??-??
repmgrd: prefix all shared library functions with "repmgr_" to
minimize the risk of clashes with other shared libraries (Ian)
repmgrd: at startup, if node record is marked as "inactive", attempt
to set it to "active" (Ian)
5.2.2. 2021-??-??
standby clone: set "slot_name" in node record if required (Ian)