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.
This commit is contained in:
Ian Barwick
2018-05-29 11:52:57 +09:00
parent b1b49748a7
commit 7613b1769c
2 changed files with 8 additions and 5 deletions

View File

@@ -177,12 +177,13 @@
<title>Using a standby cloned by another method</title>
<para>
&repmgr; supports standbys cloned by another method (e.g. using <application>barman</application>'s
<command>barman recover</command> command).
<command><ulink url="http://docs.pgbarman.org/release/2.4/#recover">barman recover</ulink></command> command).
</para>
<para>
To integrate the standby as a &repmgr; node, ensure the <filename>repmgr.conf</filename>
file is created for the node, then execute the command
<command>repmgr standby clone --recovery-conf-only</command>.
file is created for the node, and that it has been registered using
<command><link linkend="repmgr-standby-register">repmgr standby register</link></command>.
Then execute the command <command>repmgr standby clone --recovery-conf-only</command>.
This will create the <filename>recovery.conf</filename> file needed to attach
the node to its upstream, and will also create a replication slot on the
upstream node if required.

View File

@@ -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);
}