mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 15:46:29 +00:00
Compare commits
7 Commits
v4.4.0beta
...
v4.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40b6c92129 | ||
|
|
761d65526c | ||
|
|
a13a1232e9 | ||
|
|
65965b3ba4 | ||
|
|
629d2b8f85 | ||
|
|
23c285b73b | ||
|
|
915fb7d617 |
3
HISTORY
3
HISTORY
@@ -1,4 +1,4 @@
|
|||||||
4.4 2019-??-??
|
4.4 2019-06-27
|
||||||
repmgr: improve "daemon status" output (Ian)
|
repmgr: improve "daemon status" output (Ian)
|
||||||
repmgr: add "--siblings-follow" option to "standby promote" (Ian)
|
repmgr: add "--siblings-follow" option to "standby promote" (Ian)
|
||||||
repmgr: add "--repmgrd-force-unpause" option to "standby switchover" (Ian)
|
repmgr: add "--repmgrd-force-unpause" option to "standby switchover" (Ian)
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
repmgr: ensure BDR2-specific functionality cannot be used on
|
repmgr: ensure BDR2-specific functionality cannot be used on
|
||||||
BDR3 and later (Ian)
|
BDR3 and later (Ian)
|
||||||
repmgr: canonicalize the data directory path (Ian)
|
repmgr: canonicalize the data directory path (Ian)
|
||||||
|
repmgr: note that "standby follow" requires a primary to be available (Ian)
|
||||||
repmgrd: monitor standbys attached to primary (Ian)
|
repmgrd: monitor standbys attached to primary (Ian)
|
||||||
repmgrd: add "primary visibility consensus" functionality (Ian)
|
repmgrd: add "primary visibility consensus" functionality (Ian)
|
||||||
repmgrd: fix memory leak which occurs while the monitored PostgreSQL
|
repmgrd: fix memory leak which occurs while the monitored PostgreSQL
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<sect1 id="release-4.4">
|
<sect1 id="release-4.4">
|
||||||
<title>Release 4.4</title>
|
<title>Release 4.4</title>
|
||||||
<para><emphasis>?? June, 2019</emphasis></para>
|
<para><emphasis>27 June, 2019</emphasis></para>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>repmgr client enhancements</title>
|
<title>repmgr client enhancements</title>
|
||||||
@@ -43,6 +43,14 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>:
|
||||||
|
note that an active, reachable cluster primary is required for this command;
|
||||||
|
and provide a more helpful error message if no reachable primary could be found.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
&repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>,
|
&repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>,
|
||||||
@@ -75,7 +83,6 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>:
|
<link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>:
|
||||||
|
|||||||
124
doc/configuration-file-optional-settings.xml
Normal file
124
doc/configuration-file-optional-settings.xml
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<sect1 id="configuration-file-optional-settings" xreflabel="optional configuration file settings">
|
||||||
|
|
||||||
|
<title>Optional configuration file settings</title>
|
||||||
|
|
||||||
|
<indexterm>
|
||||||
|
<primary>repmgr.conf</primary>
|
||||||
|
<secondary>optional settings</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry id="repmgr-conf-config-directory" xreflabel="config_directory">
|
||||||
|
<term><varname>config_directory</varname> (<type>string</type>)
|
||||||
|
<indexterm>
|
||||||
|
<primary><varname>config_directory</varname> configuration file parameter</primary>
|
||||||
|
</indexterm>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If PostgreSQL configuration files are located outside the data
|
||||||
|
directory, specify the directory where the main
|
||||||
|
<filename>postgresql.conf</filename> file is located.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This enables explicit provision of an external configuration file
|
||||||
|
directory, which if set will be passed to <command>pg_ctl</command> as the
|
||||||
|
<option>-D</option> parameter. Otherwise <command>pg_ctl</command> will
|
||||||
|
default to using the data directory, which will cause some operations
|
||||||
|
to fail if the configuration files are not present there.
|
||||||
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is implemented primarily for feature completeness and for
|
||||||
|
development/testing purposes. Users who have installed &repmgr; from
|
||||||
|
a package should <emphasis>not</emphasis> rely on to stop/start/restart PostgreSQL,
|
||||||
|
instead they should set the appropriate <option>service_..._command</option>
|
||||||
|
for their operating system. For more details see
|
||||||
|
<xref linkend="configuration-file-service-commands"/>.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry id="repmgr-conf-replication-user" xreflabel="replication_user">
|
||||||
|
<term><varname>replication_user</varname> (<type>string</type>)
|
||||||
|
<indexterm>
|
||||||
|
<primary><varname>replication_user</varname> configuration file parameter</primary>
|
||||||
|
</indexterm>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
PostgreSQL user to make replication connections with.
|
||||||
|
If not set defaults, to the user defined in <xref linkend="repmgr-conf-conninfo"/>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry id="repmgr-conf-replication-type" xreflabel="replication_type">
|
||||||
|
<term><varname>replication_type</varname> (<type>string</type>)
|
||||||
|
<indexterm>
|
||||||
|
<primary><varname>replication_type</varname> configuration file parameter</primary>
|
||||||
|
</indexterm>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Must be one of <literal>physical</literal> (for standard streaming replication)
|
||||||
|
or <literal>bdr</literal>.
|
||||||
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
Replication type <literal>bdr</literal> can only be used with BDR 2.x
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
BDR 3.x users should use <literal>physical</literal>.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry id="repmgr-conf-location" xreflabel="location">
|
||||||
|
<term><varname>location</varname> (<type>string</type>)
|
||||||
|
<indexterm>
|
||||||
|
<primary><varname>location</varname> configuration file parameter</primary>
|
||||||
|
</indexterm>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
An arbitrary string defining the location of the node; this
|
||||||
|
is used during failover to check visibility of the
|
||||||
|
current primary node.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
For more details see <xref linkend="repmgrd-network-split"/>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry id="repmgr-conf-use-replication-slots" xreflabel="use_replication_slots">
|
||||||
|
<term><varname>use_replication_slots</varname> (<type>boolean</type>)
|
||||||
|
<indexterm>
|
||||||
|
<primary><varname>use_replication_slots</varname> configuration file parameter</primary>
|
||||||
|
</indexterm>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Whether to use physical replication slots.
|
||||||
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
When using replication slots,
|
||||||
|
<varname>max_replication_slots</varname> should be configured for
|
||||||
|
at least the number of standbys which will connect
|
||||||
|
to the primary.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
</sect1>
|
||||||
@@ -20,22 +20,17 @@
|
|||||||
("follow target"). Typically this will be the primary, but this
|
("follow target"). Typically this will be the primary, but this
|
||||||
command can also be used to attach the standby to another standby.
|
command can also be used to attach the standby to another standby.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This command requires a valid
|
This command requires a valid <filename>repmgr.conf</filename> file for the standby,
|
||||||
<filename>repmgr.conf</filename> file for the standby, either specified
|
either specified explicitly with <literal>-f/--config-file</literal> or located in a
|
||||||
explicitly with <literal>-f/--config-file</literal> or located in a
|
|
||||||
default location; no additional arguments are required.
|
default location; no additional arguments are required.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>The standby node ("follow candidate") <emphasis>must</emphasis>
|
||||||
By default &repmgr; will attempt to attach the standby to the current primary.
|
be running. If the new upstream ("follow target") is not the primary,
|
||||||
If <option>--upstream-node-id</option> is provided, &repmgr; will attempt
|
the cluster primary <emphasis>must</emphasis> be running and accessible from the
|
||||||
to attach the standby to the specified node, which can be another standby.
|
standby node.
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This command will force a restart of the standby server, which must be
|
|
||||||
running.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
@@ -45,6 +40,16 @@
|
|||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By default &repmgr; will attempt to attach the standby to the current primary.
|
||||||
|
If <option>--upstream-node-id</option> is provided, &repmgr; will attempt
|
||||||
|
to attach the standby to the specified node, which can be another standby.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This command will force a restart of PostgreSQL on the standby node.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>repmgr standby follow</command> will wait up to
|
<command>repmgr standby follow</command> will wait up to
|
||||||
<varname>standby_follow_timeout</varname> seconds (default: <literal>30</literal>)
|
<varname>standby_follow_timeout</varname> seconds (default: <literal>30</literal>)
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
|||||||
<tip>
|
<tip>
|
||||||
<para>
|
<para>
|
||||||
Use <command><link linkend="repmgr-node-check">repmgr node check</link></command>
|
Use <command><link linkend="repmgr-node-check">repmgr node check</link></command>
|
||||||
to determine which replacation slots need to be recreated.
|
to determine which replication slots need to be recreated.
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
|
|||||||
@@ -2784,12 +2784,6 @@ do_standby_follow(void)
|
|||||||
|
|
||||||
PQfinish(local_conn);
|
PQfinish(local_conn);
|
||||||
|
|
||||||
if (runtime_options.dry_run == true)
|
|
||||||
{
|
|
||||||
log_info(_("prerequisites for executing STANDBY FOLLOW are met"));
|
|
||||||
exit(SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here we'll need a connection to the primary, if the upstream is not a primary.
|
* Here we'll need a connection to the primary, if the upstream is not a primary.
|
||||||
*/
|
*/
|
||||||
@@ -2802,12 +2796,30 @@ do_standby_follow(void)
|
|||||||
primary_conn = get_primary_connection_quiet(follow_target_conn,
|
primary_conn = get_primary_connection_quiet(follow_target_conn,
|
||||||
&primary_node_id,
|
&primary_node_id,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If follow target is not primary and no other primary could be found,
|
||||||
|
* abort because we won't be able to update the node record.
|
||||||
|
*/
|
||||||
|
if (PQstatus(primary_conn) != CONNECTION_OK)
|
||||||
|
{
|
||||||
|
log_error(_("unable to determine the cluster primary"));
|
||||||
|
log_detail(_("an active primary node is required for \"repmgr standby follow\""));
|
||||||
|
PQfinish(follow_target_conn);
|
||||||
|
exit(ERR_FOLLOW_FAIL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
primary_conn = follow_target_conn;
|
primary_conn = follow_target_conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runtime_options.dry_run == true)
|
||||||
|
{
|
||||||
|
log_info(_("prerequisites for executing STANDBY FOLLOW are met"));
|
||||||
|
exit(SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
initPQExpBuffer(&follow_output);
|
initPQExpBuffer(&follow_output);
|
||||||
|
|
||||||
success = do_standby_follow_internal(
|
success = do_standby_follow_internal(
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#define REPMGR_VERSION_DATE ""
|
#define REPMGR_VERSION_DATE ""
|
||||||
#define REPMGR_VERSION "4.4beta2"
|
#define REPMGR_VERSION "4.4"
|
||||||
#define REPMGR_VERSION_NUM 40400
|
#define REPMGR_VERSION_NUM 40400
|
||||||
|
|||||||
Reference in New Issue
Block a user