From 7613b1769c609fccac07c3d301c54e0d3a6aa4b8 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 29 May 2018 11:52:57 +0900 Subject: [PATCH] standby clone: --recovery-conf-only expects the standby to be registered Note this in the documentation, and add a HINT about registering it if the standby record is not available. Related to GitHub #438. --- doc/repmgr-standby-clone.sgml | 7 ++++--- repmgr-action-standby.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/repmgr-standby-clone.sgml b/doc/repmgr-standby-clone.sgml index ac3d927d..b3ef9fa5 100644 --- a/doc/repmgr-standby-clone.sgml +++ b/doc/repmgr-standby-clone.sgml @@ -177,12 +177,13 @@ Using a standby cloned by another method &repmgr; supports standbys cloned by another method (e.g. using barman's - barman recover command). + 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. + file is created for the node, and that it has been registered using + repmgr standby register. + 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. diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index faacdb37..b2f58d18 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -938,7 +938,6 @@ _do_create_recovery_conf(void) log_detail("%s", PQerrorMessage(source_conn)); } - exit(ERR_BAD_CONFIG); } @@ -955,7 +954,10 @@ _do_create_recovery_conf(void) { log_detail("%s", PQerrorMessage(source_conn)); } - + else + { + log_hint(_("standby must be registered before a new recovery.conf file can be created")); + } exit(ERR_BAD_CONFIG); }