repmgrd configuration
+ repmgrd setup and configurationrepmgrd is a daemon which runs on each PostgreSQL node,
@@ -20,7 +20,7 @@
- repmgrd basic configuration
+ repmgrd configuration
To use repmgrd, its associated function library must be
@@ -34,6 +34,112 @@
the PostgreSQL documentation.
+
+ The following configuraton options apply to repmgrd in all circumstances:
+
+
+
+
+
+
+ monitor_interval_secs
+
+
+
+
+ The interval (in seconds, default: 2) to check the availability of the upstream node.
+
+
+
+
+
+
+
+
+ connection_check_type
+
+
+
+
+ The option is used to select the method
+ repmgrd uses to determine whether the upstream node is available.
+
+
+ Possible values are:
+
+
+
+ ping (default) - uses PQping() to
+ determine server availability
+
+
+
+
+ connection - determines server availability
+ by executing an SQL statement on the node via the existing connection
+
+
+
+
+
+
+
+
+
+ reconnect_attempts
+
+
+
+
+ The number of attempts (default: 6) will be made to reconnect to an unreachable
+ upstream node before initiating a failover.
+
+
+ There will be an interval of seconds between each reconnection
+ attempt.
+
+
+
+
+
+ reconnect_interval
+
+
+
+
+ Interval (in seconds, default: 10) between attempts to reconnect to an unreachable
+ upstream node.
+
+
+ The number of reconnection attempts is defined by the parameter .
+
+
+
+
+
+
+
+
+ degraded_monitoring_timeout
+
+
+
+
+ Interval (in seconds) after which repmgrd will terminate if
+ either of the servers (local node and or upstream node) being monitored is no longer available
+ (degraded monitoring mode).
+
+
+ -1 (default) disables this timeout completely.
+
+
+
+
+
+
+
+ See also repmgr.conf.sample for an annotated sample configuration file..
+ Required configuration for automatic failover
@@ -194,51 +300,24 @@
Optional configuration for automatic failover
- The following configuraton options can be used to fine-tune automatic failove:
+ The following configuraton options can be use to fine-tune automatic failover:
-
-
- monitor_interval_secs
-
-
-
-
- The interval (in seconds, default: 2) to check the availability of the upstream node.
-
-
-
-
-
-
-
- connection_check_type
+ priority
-
+
- The option is used to select the method
- repmgrd uses to determine whether the upstream node is available.
+ Indicates a preferred priority (default: 100) for promoting nodes;
+ a value of zero prevents the node being promoted to primary.
- Possible values are:
-
-
-
- ping (default) - uses PQping() to
- determine server availability
-
-
-
-
- connection - determines server availability
- by executing an SQL statement on the node via the existing connection
-
-
-
+ Note that the priority setting is only applied if two or more nodes are
+ determined as promotion candidates; in that case the node with the
+ higher priority is selected.
@@ -255,7 +334,7 @@
- This optiom must be identically configurered
+ This option must be identically configured
on all nodes.
@@ -275,6 +354,70 @@
+
+
+
+
+ primary_visibility_consensus
+
+
+
+
+ If true, only continue with failover if no standbys have seen
+ the primary node recently.
+
+
+
+ This option must be identically configured
+ on all nodes.
+
+
+
+
+
+
+
+
+ standby_disconnect_on_failover
+
+
+
+
+ In a failover situation, disconnect the local node's WAL receiver.
+
+
+ This option is available from PostgreSQL 9.5 and later.
+
+
+
+ This option must be identically configured
+ on all nodes.
+
+
+ Additionally the &repmgr; user must be a superuser
+ for this option.
+
+
+ repmgrd will refuse to start if this option is set
+ but either of these prerequisites is not met.
+
+
+
+
+
+
+
+
+
+
+
+
+ The following options can be used to further fine-tune failover behaviour.
+ In practice it's unlikely these will need to be changed from their default
+ values, but are available as configuration options should the need arise.
+
+
+
election_rerun_interval
@@ -288,12 +431,24 @@
+
+
+
+ sibling_nodes_disconnect_timeout
+
+
+
+
+ If is true, the
+ maximum length of time (in seconds, default: 30)
+ to wait for other standbys to confirm they have disconnected their
+ WAL receivers.
+
+
+
-
- See repmgr.conf.sample
- for further repmgrd-specific settings.
-
+
diff --git a/doc/repmgrd-degraded-monitoring.sgml b/doc/repmgrd-degraded-monitoring.sgml
index 6f7e8a03..9773f813 100644
--- a/doc/repmgrd-degraded-monitoring.sgml
+++ b/doc/repmgrd-degraded-monitoring.sgml
@@ -4,6 +4,10 @@
degraded monitoring
+
+ degraded monitoring
+
+
"degraded monitoring" mode
In certain circumstances, repmgrd is not able to fulfill its primary mission
diff --git a/repmgr.conf.sample b/repmgr.conf.sample
index fa5bbea0..a8441088 100644
--- a/repmgr.conf.sample
+++ b/repmgr.conf.sample
@@ -281,7 +281,7 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
# manual attention to reattach it to replication
# (does not apply to BDR mode)
-#priority=100 # indicate a preferred priority for promoting nodes;
+#priority=100 # indicates a preferred priority for promoting nodes;
# a value of zero prevents the node being promoted to primary
# (default: 100)
@@ -311,7 +311,7 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
#monitoring_history=no # Whether to write monitoring data to the "montoring_history" table
#monitor_interval_secs=2 # Interval (in seconds) at which to write monitoring data
#degraded_monitoring_timeout=-1 # Interval (in seconds) after which repmgrd will terminate if the
- # server being monitored is no longer available. -1 (default)
+ # server(s) being monitored are no longer available. -1 (default)
# disables the timeout completely.
#async_query_timeout=60 # Interval (in seconds) which repmgrd will wait before
# cancelling an asynchronous query.
@@ -323,12 +323,13 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
# Note: there is normally no need to set this, particularly if
# repmgr was installed from packages.
#standby_disconnect_on_failover=false # If "true", in a failover situation wait for all standbys to
- # disconnect their WAL receivers before electing a new primary
-#sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover", maximum length of time (in seconds)
- # to wait for other standbys to confirm they have disconnected their
+ # disconnect their WAL receivers before electing a new primary
+ # (PostgreSQL 9.5 and later only; repmgr user must be a superuser for this)
+#sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover" is true, the maximum length of time
+ # (in seconds) to wait for other standbys to confirm they have disconnected their
# WAL receivers
#primary_visibility_consensus=false # If "true", only continue with failover if no standbys have seen
- # the primary node recently
+ # the primary node recently. *Must* be the same on all nodes.
#failover_validation_command= # Script to execute for an external mechanism to validate the failover
# decision made by repmgrd. One or both of the following parameter placeholders
# should be provided, which will be replaced by repmgrd with the appropriate