mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
standby clone: rename --recovery-conf-only to --replication-conf-only
A more generic option name to cover pre- and post-Pg12 replication configuration methods. --recovery-conf-only is retained as an alias for backwards compatibility.
This commit is contained in:
@@ -245,7 +245,7 @@
|
|||||||
<para>
|
<para>
|
||||||
For a standby which has been manually cloned or recovered from an external
|
For a standby which has been manually cloned or recovered from an external
|
||||||
backup manager such as Barman, the command
|
backup manager such as Barman, the command
|
||||||
<command><link linkend="repmgr-standby-clone">repmgr standby clone --recovery-conf-only</link></command>
|
<command><link linkend="repmgr-standby-clone">repmgr standby clone --replication-conf-only</link></command>
|
||||||
can be used to create the correct <filename>recovery.conf</filename> file for
|
can be used to create the correct <filename>recovery.conf</filename> file for
|
||||||
use with &repmgr; (and will create a replication slot if required). Once this has been done,
|
use with &repmgr; (and will create a replication slot if required). Once this has been done,
|
||||||
<link linkend="repmgr-standby-register">register the node</link> as usual.
|
<link linkend="repmgr-standby-register">register the node</link> as usual.
|
||||||
|
|||||||
@@ -17,6 +17,36 @@
|
|||||||
|
|
||||||
<!-- remember to update the release date in ../repmgr_version.h.in -->
|
<!-- remember to update the release date in ../repmgr_version.h.in -->
|
||||||
|
|
||||||
|
<sect1 id="release-5.1.0">
|
||||||
|
<title>Release 5.1.0</title>
|
||||||
|
<para><emphasis>?? ?? ??, 20??</emphasis></para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
&repmgr; 5.1.0 is a major release.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
For details on how to upgrade an existing &repmgr; installation, see
|
||||||
|
documentation section <link linkend="upgrading-major-version">Upgrading a major version release</link>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If &repmgrd; is in use, a PostgreSQL restart <emphasis>is</emphasis> required;
|
||||||
|
in that case we suggest combining this &repmgr; upgrade with the next PostgreSQL
|
||||||
|
minor release, which will require a PostgreSQL restart in any case.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<sect2>
|
||||||
|
<title>Compatibility changes</title>
|
||||||
|
<para>
|
||||||
|
The <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link>
|
||||||
|
<option>--recovery-conf-only</option> option has been renamed to
|
||||||
|
<option>--replication-conf-only</option>. <option>--recovery-conf-only</option> will
|
||||||
|
still be accepted as an alias.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="release-5.0">
|
<sect1 id="release-5.0">
|
||||||
<title id="release-current">Release 5.0</title>
|
<title id="release-current">Release 5.0</title>
|
||||||
<para><emphasis>Tue 15 October, 2019</emphasis></para>
|
<para><emphasis>Tue 15 October, 2019</emphasis></para>
|
||||||
|
|||||||
@@ -64,8 +64,9 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Barman's parallel restore facility can be used by executing it manually on
|
Barman's parallel restore facility can be used by executing it manually on
|
||||||
the Barman server and integrating the resulting cloned standby using
|
the Barman server and configuring replication on the resulting cloned
|
||||||
<command><link linkend="repmgr-standby-clone">repmgr standby clone --recovery-conf-only</link></command>.
|
standby using
|
||||||
|
<command><link linkend="repmgr-standby-clone">repmgr standby clone --replication-conf-only</link></command>.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
|||||||
@@ -188,18 +188,18 @@
|
|||||||
</note>
|
</note>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<!-- don't rename this id as it may be used in external links -->
|
||||||
<refsect1 id="repmgr-standby-create-recovery-conf">
|
<refsect1 id="repmgr-standby-create-recovery-conf">
|
||||||
|
|
||||||
<title>Using a standby cloned by another method</title>
|
<title>Using a standby cloned by another method</title>
|
||||||
|
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>recovery.conf</primary>
|
<primary>replication configuration</primary>
|
||||||
<secondary>generating for a standby cloned by another method</secondary>
|
<secondary>generating for a standby cloned by another method</secondary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>replication configuration</primary>
|
<primary>recovery.conf</primary>
|
||||||
<secondary>generating for a standby cloned by another method</secondary>
|
<secondary>generating for a standby cloned by another method</secondary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
<para>
|
<para>
|
||||||
Then execute the command <command>repmgr standby clone --recovery-conf-only</command>.
|
Then execute the command <command>repmgr standby clone --replication-conf-only</command>.
|
||||||
This will create the <filename>recovery.conf</filename> file needed to attach
|
This will create the <filename>recovery.conf</filename> file needed to attach
|
||||||
the node to its upstream (in PostgreSQL 12 and later: append replication configuration
|
the node to its upstream (in PostgreSQL 12 and later: append replication configuration
|
||||||
to <filename>postgresql.auto.conf</filename>), and will also create a replication slot on the
|
to <filename>postgresql.auto.conf</filename>), and will also create a replication slot on the
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
<option>-F/--force</option> option is provided.
|
<option>-F/--force</option> option is provided.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Execute <command>repmgr standby clone --recovery-conf-only --dry-run</command>
|
Execute <command>repmgr standby clone --replication-conf-only --dry-run</command>
|
||||||
to check the prerequisites for creating the recovery configuration,
|
to check the prerequisites for creating the recovery configuration,
|
||||||
and display the contents of the configuration which would be added without actually
|
and display the contents of the configuration which would be added without actually
|
||||||
making any changes.
|
making any changes.
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
Check prerequisites but don't actually clone the standby.
|
Check prerequisites but don't actually clone the standby.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If <option>--recovery-conf-only</option> specified, the contents of
|
If <option>--replication-conf-only</option> specified, the contents of
|
||||||
the generated recovery configuration will be displayed
|
the generated recovery configuration will be displayed
|
||||||
but not written.
|
but not written.
|
||||||
</para>
|
</para>
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option> --recovery-conf-only</option></term>
|
<term><option>--replication-conf-only</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Create recovery configuration for a previously cloned instance.
|
Create recovery configuration for a previously cloned instance.
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<command><ulink url="https://docs.pgbarman.org/#recover">barman recover</ulink></command>
|
<command><ulink url="https://docs.pgbarman.org/#recover">barman recover</ulink></command>
|
||||||
command), register the node as detailed in section
|
command), register the node as detailed in section
|
||||||
<xref linkend="repmgr-standby-register-inactive-node"/> then execute
|
<xref linkend="repmgr-standby-register-inactive-node"/> then execute
|
||||||
<link linkend="repmgr-standby-create-recovery-conf">repmgr standby clone --recovery-conf-only</link>
|
<link linkend="repmgr-standby-create-recovery-conf">repmgr standby clone --replication-conf-only</link>
|
||||||
to generate the appropriate replication configuration.
|
to generate the appropriate replication configuration.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ static bool parse_data_directory_config(const char *node_check_output);
|
|||||||
* -R/--remote-user
|
* -R/--remote-user
|
||||||
* --replication-user (only required if no upstream record)
|
* --replication-user (only required if no upstream record)
|
||||||
* --without-barman
|
* --without-barman
|
||||||
* --recovery-conf-only
|
* --replication-conf-only (--recovery-conf-only)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -159,9 +159,9 @@ do_standby_clone(void)
|
|||||||
initialize_conninfo_params(&recovery_conninfo, false);
|
initialize_conninfo_params(&recovery_conninfo, false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* --recovery-conf-only provided - we'll handle that separately
|
* --replication-conf-only provided - we'll handle that separately
|
||||||
*/
|
*/
|
||||||
if (runtime_options.recovery_conf_only == true)
|
if (runtime_options.replication_conf_only == true)
|
||||||
{
|
{
|
||||||
return _do_create_recovery_conf();
|
return _do_create_recovery_conf();
|
||||||
}
|
}
|
||||||
@@ -7908,7 +7908,7 @@ do_standby_help(void)
|
|||||||
" when the intended upstream server does not yet exist\n"));
|
" when the intended upstream server does not yet exist\n"));
|
||||||
printf(_(" --upstream-node-id ID of the upstream node to replicate from (optional, defaults to primary node)\n"));
|
printf(_(" --upstream-node-id ID of the upstream node to replicate from (optional, defaults to primary node)\n"));
|
||||||
printf(_(" --without-barman do not use Barman even if configured\n"));
|
printf(_(" --without-barman do not use Barman even if configured\n"));
|
||||||
printf(_(" --recovery-conf-only generate replication configuration for a previously cloned instance\n"));
|
printf(_(" --replication-conf-only generate replication configuration for a previously cloned instance\n"));
|
||||||
|
|
||||||
puts("");
|
puts("");
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ typedef struct
|
|||||||
char replication_user[MAXLEN];
|
char replication_user[MAXLEN];
|
||||||
char upstream_conninfo[MAXLEN];
|
char upstream_conninfo[MAXLEN];
|
||||||
bool without_barman;
|
bool without_barman;
|
||||||
bool recovery_conf_only;
|
bool replication_conf_only;
|
||||||
|
|
||||||
/* "standby clone"/"standby follow" options */
|
/* "standby clone"/"standby follow" options */
|
||||||
int upstream_node_id;
|
int upstream_node_id;
|
||||||
|
|||||||
@@ -431,8 +431,8 @@ main(int argc, char **argv)
|
|||||||
runtime_options.without_barman = true;
|
runtime_options.without_barman = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPT_RECOVERY_CONF_ONLY:
|
case OPT_REPLICATION_CONF_ONLY:
|
||||||
runtime_options.recovery_conf_only = true;
|
runtime_options.replication_conf_only = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@@ -1705,7 +1705,7 @@ check_cli_parameters(const int action)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runtime_options.recovery_conf_only == true)
|
if (runtime_options.replication_conf_only == true)
|
||||||
{
|
{
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
#define OPT_WAIT_START 1034
|
#define OPT_WAIT_START 1034
|
||||||
#define OPT_REPL_CONN 1035
|
#define OPT_REPL_CONN 1035
|
||||||
#define OPT_REMOTE_NODE_ID 1036
|
#define OPT_REMOTE_NODE_ID 1036
|
||||||
#define OPT_RECOVERY_CONF_ONLY 1037
|
#define OPT_REPLICATION_CONF_ONLY 1037
|
||||||
#define OPT_NO_WAIT 1038
|
#define OPT_NO_WAIT 1038
|
||||||
#define OPT_MISSING_SLOTS 1039
|
#define OPT_MISSING_SLOTS 1039
|
||||||
#define OPT_REPMGRD_NO_PAUSE 1040
|
#define OPT_REPMGRD_NO_PAUSE 1040
|
||||||
@@ -157,7 +157,9 @@ static struct option long_options[] =
|
|||||||
{"upstream-conninfo", required_argument, NULL, OPT_UPSTREAM_CONNINFO},
|
{"upstream-conninfo", required_argument, NULL, OPT_UPSTREAM_CONNINFO},
|
||||||
{"upstream-node-id", required_argument, NULL, OPT_UPSTREAM_NODE_ID},
|
{"upstream-node-id", required_argument, NULL, OPT_UPSTREAM_NODE_ID},
|
||||||
{"without-barman", no_argument, NULL, OPT_WITHOUT_BARMAN},
|
{"without-barman", no_argument, NULL, OPT_WITHOUT_BARMAN},
|
||||||
{"recovery-conf-only", no_argument, NULL, OPT_RECOVERY_CONF_ONLY},
|
{"replication-conf-only", no_argument, NULL, OPT_REPLICATION_CONF_ONLY},
|
||||||
|
/* deprecate this once Pg11 and earlier are unsupported */
|
||||||
|
{"recovery-conf-only", no_argument, NULL, OPT_REPLICATION_CONF_ONLY},
|
||||||
|
|
||||||
/* "standby register" options */
|
/* "standby register" options */
|
||||||
{"wait-start", required_argument, NULL, OPT_WAIT_START},
|
{"wait-start", required_argument, NULL, OPT_WAIT_START},
|
||||||
|
|||||||
Reference in New Issue
Block a user