diff --git a/HISTORY b/HISTORY
index f5beb371..5aff447b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,7 +1,9 @@
5.2.0 2020-??-??
repmgr: improve database connection failure error checking on the
demotion candidate during "standby switchover" (Ian)
- repmgr: add option --verify-backup to "standby clone"
+ repmgr: add option --verify-backup to "standby clone" (Ian)
+ repmgrd: add additional optional parameters to "failover_validation command"
+ (spaskalev; GitHub #651)
5.1.0 2020-04-13
repmgr: remove BDR 2.x support
diff --git a/doc/appendix-release-notes.xml b/doc/appendix-release-notes.xml
index 7c752f1f..95c97e2d 100644
--- a/doc/appendix-release-notes.xml
+++ b/doc/appendix-release-notes.xml
@@ -45,6 +45,38 @@
+
+ repmgrd enhancements
+
+
+
+
+
+ Following additional parameters can be provided to failover_validation_command:
+
+
+ %n: node ID
+
+
+ %a: node name
+
+
+ %v: number of visible nodes
+
+
+ %u: number of shared upstream nodes
+
+
+ %t: total number of nodes
+
+
+
+
+
+
+
+
+
diff --git a/doc/repmgrd-automatic-failover.xml b/doc/repmgrd-automatic-failover.xml
index b46f9902..d8308e8e 100644
--- a/doc/repmgrd-automatic-failover.xml
+++ b/doc/repmgrd-automatic-failover.xml
@@ -331,11 +331,12 @@
To use this, in repmgr.conf
to a script executable by the postgres system user, e.g.:
- failover_validation_command=/path/to/script.sh %n %a
+ failover_validation_command=/path/to/script.sh %n
- The %n parameter will be replaced with the node ID, and the
- %a parameter will be replaced by the node name when the script is executed.
+ The %n parameter will be replaced with the node ID when the script is
+ executed. A number of other parameters are also available, see section
+ "" for details.
This script must return an exit code of 0 to indicate the node should promote itself.
diff --git a/doc/repmgrd-configuration.xml b/doc/repmgrd-configuration.xml
index ddea8307..647a1f94 100644
--- a/doc/repmgrd-configuration.xml
+++ b/doc/repmgrd-configuration.xml
@@ -325,7 +325,7 @@
-
+ Optional configuration for automatic failover
@@ -370,8 +370,8 @@
- One or both of the following parameter placeholders
- should be provided, which will be replaced by repmgrd with the appropriate
+ One or more of the following parameter placeholders
+ may be provided, which will be replaced by repmgrd with the appropriate
value:
@@ -380,6 +380,15 @@
%a: node name
+
+ %v: number of visible nodes
+
+
+ %u: number of shared upstream nodes
+
+
+ %t: total number of nodes
+