From 4589b8d439986e92e87198b85c6f6c3e703ea80f Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 16 Jul 2018 14:55:07 +0900 Subject: [PATCH] doc: update documentation of "promote_command" and "service_promote_command" See commit 63242e2277ac4afc39e52ffc7030abad09df2929 --- doc/configuration-service-commands.sgml | 16 ++++++++++++---- doc/repmgrd-configuration.sgml | 25 ++++++++++++++++++------- repmgr.conf.sample | 14 +++++++------- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/doc/configuration-service-commands.sgml b/doc/configuration-service-commands.sgml index e783d821..d99c3945 100644 --- a/doc/configuration-service-commands.sgml +++ b/doc/configuration-service-commands.sgml @@ -47,16 +47,24 @@ service_restart_command service_reload_command - - It's also possible to specify a service_promote_command; - this overrides any value contained in the setting promote_command. + It's also possible to specify a service_promote_command. This is intended for systems which provide a package-level promote command, - such as Debian's pg_ctlcluster. + such as Debian's pg_ctlcluster, to promote the + PostgreSQL from standby to primary. + + + If your packaging system does not provide such a command, it can be left empty, + and &repmgr; will generate the appropriate pg_ctl ... promote command. + + + Do not confuse this with promote_command, which is used + by repmgrd to execute . + To confirm which command &repmgr; will execute for each action, use repmgr node service --list --action=..., e.g.: diff --git a/doc/repmgrd-configuration.sgml b/doc/repmgrd-configuration.sgml index 7f046d47..2d390519 100644 --- a/doc/repmgrd-configuration.sgml +++ b/doc/repmgrd-configuration.sgml @@ -34,6 +34,24 @@ the PostgreSQL documentation. + + To apply configuration file changes to a running repmgrd + daemon, execute the operating system's rrepmgrd service reload command + (see for examples), + or for instances which were manually started, execute kill -HUP, e.g. + kill -HUP `cat /tmp/repmgrd.pid`. + + + + Check the repmgrd log to see what changes were + applied, or if any issues were encountered when reloading the configuration. + + + + Note that only a subset of configuration file parameters can be changed on a + running repmgrd daemon. + + automatic failover configuration @@ -162,13 +180,6 @@ repmgrd -f /etc/repmgr.conf --pid-file /tmp/repmgrd.pid --daemonize and stopped with kill `cat /tmp/repmgrd.pid`. Adjust paths as appropriate. - - To apply configuration file changes to a running repmgrd - daemon, execute the operating system's service reload command (for manually started - instances, execute kill -HUP `cat /tmp/repmgrd.pid`). - Note that only a subset of configuration file parameters can be changed on a - running repmgrd daemon. - diff --git a/repmgr.conf.sample b/repmgr.conf.sample index 35deee44..713eab1f 100644 --- a/repmgr.conf.sample +++ b/repmgr.conf.sample @@ -253,11 +253,11 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh" # primary (or other upstream node) #reconnect_interval=10 # Interval between attempts to reconnect to an unreachable # primary (or other upstream node) -#promote_command= # command to execute when promoting a new primary; use something like: +#promote_command= # command repmgrd executes when promoting a new primary; use something like: # # repmgr standby promote -f /etc/repmgr.conf # -#follow_command= # command to execute when instructing a standby to follow a new primary; +#follow_command= # command repmgrd executes when instructing a standby to follow a new primary; # use something like: # # repmgr standby follow -f /etc/repmgr.conf -W --upstream-node-id=%n @@ -310,11 +310,11 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh" #service_stop_command = '' #service_restart_command = '' #service_reload_command = '' -#service_promote_command = '' # Note: this overrides any value contained in the setting - # "promote_command". This is intended for systems which - # provide a package-level promote command, such as Debian's - # "pg_ctlcluster" - +#service_promote_command = '' # This parameter is intended for systems which provide a + # package-level promote command, such as Debian's + # "pg_ctlcluster". *IMPORTANT*: it is *not* a substitute + # for "promote_command"; do not use "repmgr standby promote" + # (or a script which executes "repmgr standby promote") here. #------------------------------------------------------------------------------ # Status check thresholds