Compare commits

...

4 Commits

Author SHA1 Message Date
Ian Barwick
3ec43eda36 doc: remove references to "primary_visibility_consensus"
Feature remains experimental.
2019-03-18 17:43:16 +09:00
Ian Barwick
ce8e1cccc4 Remove outdated comment
This was only relevant for repmgr3 and earlier; in repmgr4 the schema
is hard-coded.
2019-03-18 15:19:25 +09:00
Ian Barwick
70bfa4c8e1 Clarify calls to check_primary_status()
Use a constant rather than a magic number to indicate non-provision
of elapsed degraded monitoring time.
2019-03-18 14:21:41 +09:00
Ian Barwick
f0d5ad503d doc: clarify "cluster show" error codes 2019-03-18 10:50:05 +09:00
7 changed files with 24 additions and 40 deletions

View File

@@ -3546,10 +3546,6 @@ _create_event(PGconn *conn, t_configuration_options *options, int node_id, char
/* /*
* Only attempt to write a record if a connection handle was provided. * Only attempt to write a record if a connection handle was provided.
* Also check that the repmgr schema has been properly initialised - if
* not it means no configuration file was provided, which can happen with
* e.g. `repmgr standby clone`, and we won't know which schema to write
* to.
*/ */
if (conn != NULL && PQstatus(conn) == CONNECTION_OK) if (conn != NULL && PQstatus(conn) == CONNECTION_OK)
{ {

View File

@@ -196,11 +196,31 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>ERR_BAD_CONFIG (1)</option></term>
<listitem>
<para>
An issue was encountered while attempting to retrieve
&repmgr; metadata.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>ERR_DB_CONN (6)</option></term>
<listitem>
<para>
&repmgr; was unable to connect to the local PostgreSQL instance.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>ERR_NODE_STATUS (25)</option></term> <term><option>ERR_NODE_STATUS (25)</option></term>
<listitem> <listitem>
<para> <para>
One or more issues were detected. One or more issues were detected with the replication configuration,
e.g. a node was not in its expected state.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -150,10 +150,6 @@
<para> <para>
Following the failover operation, no matter what the outcome, each node will reconnect its WAL receiver. Following the failover operation, no matter what the outcome, each node will reconnect its WAL receiver.
</para> </para>
<para>
If using <option>standby_disconnect_on_failover</option>, we recommend that the
<option>primary_visibility_consensus</option> option is also used.
</para>
</sect1> </sect1>

View File

@@ -364,27 +364,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<indexterm>
<primary>primary_visibility_consensus</primary>
</indexterm>
<term><option>primary_visibility_consensus</option></term>
<listitem>
<para>
If <literal>true</literal>, only continue with failover if no standbys have seen
the primary node recently.
</para>
<note>
<para>
This option <emphasis>must</emphasis> be identically configured
on all nodes.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<indexterm> <indexterm>
@@ -676,12 +655,6 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
</simpara> </simpara>
</listitem> </listitem>
<listitem>
<simpara>
<varname>primary_visibility_consensus</varname>
</simpara>
</listitem>
<listitem> <listitem>
<simpara> <simpara>
<varname>promote_command</varname> <varname>promote_command</varname>

View File

@@ -334,8 +334,6 @@ ssh_options='-q -o ConnectTimeout=10' # Options to append to "ssh"
#sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover" is true, the maximum length of time #sibling_nodes_disconnect_timeout=30 # If "standby_disconnect_on_failover" is true, the maximum length of time
# (in seconds) to wait for other standbys to confirm they have disconnected their # (in seconds) to wait for other standbys to confirm they have disconnected their
# WAL receivers # WAL receivers
#primary_visibility_consensus=false # If "true", only continue with failover if no standbys have seen
# the primary node recently. *Must* be the same on all nodes.
#failover_validation_command= # Script to execute for an external mechanism to validate the failover #failover_validation_command= # Script to execute for an external mechanism to validate the failover
# decision made by repmgrd. One or both of the following parameter placeholders # decision made by repmgrd. One or both of the following parameter placeholders
# should be provided, which will be replaced by repmgrd with the appropriate # should be provided, which will be replaced by repmgrd with the appropriate

View File

@@ -63,6 +63,7 @@
#define ELECTION_RERUN_NOTIFICATION -2 #define ELECTION_RERUN_NOTIFICATION -2
#define VOTING_TERM_NOT_SET -1 #define VOTING_TERM_NOT_SET -1
#define ARCHIVE_STATUS_DIR_ERROR -1 #define ARCHIVE_STATUS_DIR_ERROR -1
#define NO_DEGRADED_MONITORING_ELAPSED -1
#define BDR2_REPLICATION_SET_NAME "repmgr" #define BDR2_REPLICATION_SET_NAME "repmgr"

View File

@@ -351,7 +351,7 @@ monitor_streaming_primary(void)
* check that the local node is still primary, otherwise switch * check that the local node is still primary, otherwise switch
* to standby monitoring * to standby monitoring
*/ */
if (check_primary_status(-1) == false) if (check_primary_status(NO_DEGRADED_MONITORING_ELAPSED) == false)
return; return;
goto loop; goto loop;
@@ -423,7 +423,7 @@ monitor_streaming_primary(void)
loop: loop:
/* check node is still primary, if not restart monitoring */ /* check node is still primary, if not restart monitoring */
if (check_primary_status(-1) == false) if (check_primary_status(NO_DEGRADED_MONITORING_ELAPSED) == false)
return; return;
/* emit "still alive" log message at regular intervals, if requested */ /* emit "still alive" log message at regular intervals, if requested */