mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ec43eda36 | ||
|
|
ce8e1cccc4 | ||
|
|
70bfa4c8e1 | ||
|
|
f0d5ad503d |
@@ -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.
|
||||
* 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)
|
||||
{
|
||||
|
||||
@@ -196,11 +196,31 @@
|
||||
</listitem>
|
||||
</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>
|
||||
<term><option>ERR_NODE_STATUS (25)</option></term>
|
||||
<listitem>
|
||||
<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>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -150,10 +150,6 @@
|
||||
<para>
|
||||
Following the failover operation, no matter what the outcome, each node will reconnect its WAL receiver.
|
||||
</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>
|
||||
|
||||
|
||||
@@ -364,27 +364,6 @@
|
||||
</listitem>
|
||||
</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>
|
||||
|
||||
<indexterm>
|
||||
@@ -676,12 +655,6 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
<varname>primary_visibility_consensus</varname>
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
<varname>promote_command</varname>
|
||||
|
||||
@@ -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
|
||||
# (in seconds) to wait for other standbys to confirm they have disconnected their
|
||||
# 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
|
||||
# decision made by repmgrd. One or both of the following parameter placeholders
|
||||
# should be provided, which will be replaced by repmgrd with the appropriate
|
||||
|
||||
1
repmgr.h
1
repmgr.h
@@ -63,6 +63,7 @@
|
||||
#define ELECTION_RERUN_NOTIFICATION -2
|
||||
#define VOTING_TERM_NOT_SET -1
|
||||
#define ARCHIVE_STATUS_DIR_ERROR -1
|
||||
#define NO_DEGRADED_MONITORING_ELAPSED -1
|
||||
|
||||
#define BDR2_REPLICATION_SET_NAME "repmgr"
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ monitor_streaming_primary(void)
|
||||
* check that the local node is still primary, otherwise switch
|
||||
* to standby monitoring
|
||||
*/
|
||||
if (check_primary_status(-1) == false)
|
||||
if (check_primary_status(NO_DEGRADED_MONITORING_ELAPSED) == false)
|
||||
return;
|
||||
|
||||
goto loop;
|
||||
@@ -423,7 +423,7 @@ monitor_streaming_primary(void)
|
||||
loop:
|
||||
|
||||
/* 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;
|
||||
|
||||
/* emit "still alive" log message at regular intervals, if requested */
|
||||
|
||||
Reference in New Issue
Block a user