From ed0330c334fa334e50cdd7c3ef4b19f7a98e5ab6 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 23 Feb 2018 10:54:42 +0900 Subject: [PATCH] "standby clone": document --recovery-conf-only option --- HISTORY | 1 + doc/appendix-faq.sgml | 10 +++ doc/repmgr-standby-clone.sgml | 132 +++++++++++++++++++++++++++++++ doc/repmgr-standby-register.sgml | 9 +++ doc/version.sgml | 2 +- 5 files changed, 153 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index a6b8c7d6..80fd2817 100644 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,6 @@ 4.0.4 2018-03-?? repmgr: ensure "node rejoin" honours "--dry-run" option; GitHub #383 (Ian) + repmgr: add "standby clone --recovery-conf-only" option; GitHub #382 (Ian) repmgrd: improve detection of status change from primary to standby (Ian) 4.0.3 2018-02-15 diff --git a/doc/appendix-faq.sgml b/doc/appendix-faq.sgml index a0deb4d4..d879e7f9 100644 --- a/doc/appendix-faq.sgml +++ b/doc/appendix-faq.sgml @@ -180,6 +180,16 @@ + + Can I use a standby not cloned by &repmgr; as a &repmgr; node? + + Yes - use repmgr standby clone --recovery-conf-only to create the node's + recovery.conf file, and + register the node as usual. + + + + diff --git a/doc/repmgr-standby-clone.sgml b/doc/repmgr-standby-clone.sgml index e3485f9d..f309b2fb 100644 --- a/doc/repmgr-standby-clone.sgml +++ b/doc/repmgr-standby-clone.sgml @@ -100,6 +100,138 @@ + + + Using a standby cloned by another method + + &repmgr; supports standbys cloned by another method (e.g. using barman's + barman recover command). + + + To integrate the standby as a &repmgr; node, ensure the repmgr.conf + file is created for the node, then execute the command + repmgr standby clone --recovery-conf-only. + This will create the recovery.conf file needed to attach + the node to its upstream, and will also create a replication slot on the + upstream node if required. + + + Note that the upstream node must be running. An existing + recovery.conf will not be overwritten unless the + option is provided. + + + Execute repmgr standby clone --recovery-conf-only --dry-run + to check the prerequisites for creating the recovery.conf file, + and display the contents of the file without actually creating it. + + + + + Options + + + + + + + + Check prerequisites but don't actually clone the standby. + + + If specified, the contents of + the generated recovery.conf file will be displayed + but the file itself not written. + + + + + + + + + force fast checkpoint (not effective when cloning from Barman + + + + + + + + + copy configuration files located outside the data directory on the source + node to the same path on the standby (default) or to the + PostgreSQL data directory. + + + + + + + + + when using Barman, do not connect to upstream node + + + + + + + + + remote system username for SSH operations (default: current local system username) + + + + + + + + + user to make replication connections with (optional, not usually required) + + + + + + + + + primary_conninfo value to write in recovery.conf + when the intended upstream server does not yet exist + + + + + + + + + ID of the upstream node to replicate from (optional, defaults to primary node) + + + + + + + + do not use Barman even if configured + + + + + + + + + create recovery.conf file for a previously cloned instance + + + + + + + Event notifications diff --git a/doc/repmgr-standby-register.sgml b/doc/repmgr-standby-register.sgml index 0f120596..61aba28f 100644 --- a/doc/repmgr-standby-register.sgml +++ b/doc/repmgr-standby-register.sgml @@ -92,6 +92,15 @@ + + Registering a node not cloned by repmgr + + If you've cloned a standby using another method (e.g. barman's + barman recover command), first execute + repmgr standby clone --recovery-conf-only + to add the recovery.conf file, then register the standby as usual. + + Event notifications diff --git a/doc/version.sgml b/doc/version.sgml index b797a560..c6ddc20f 100644 --- a/doc/version.sgml +++ b/doc/version.sgml @@ -1 +1 @@ - +