mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
doc: merge repmgrd witness server description into failover section
This commit is contained in:
@@ -54,7 +54,6 @@
|
|||||||
<!ENTITY repmgrd-automatic-failover SYSTEM "repmgrd-automatic-failover.sgml">
|
<!ENTITY repmgrd-automatic-failover SYSTEM "repmgrd-automatic-failover.sgml">
|
||||||
<!ENTITY repmgrd-configuration SYSTEM "repmgrd-configuration.sgml">
|
<!ENTITY repmgrd-configuration SYSTEM "repmgrd-configuration.sgml">
|
||||||
<!ENTITY repmgrd-operation SYSTEM "repmgrd-operation.sgml">
|
<!ENTITY repmgrd-operation SYSTEM "repmgrd-operation.sgml">
|
||||||
<!ENTITY repmgrd-witness-server SYSTEM "repmgrd-witness-server.sgml">
|
|
||||||
<!ENTITY repmgrd-bdr SYSTEM "repmgrd-bdr.sgml">
|
<!ENTITY repmgrd-bdr SYSTEM "repmgrd-bdr.sgml">
|
||||||
|
|
||||||
<!ENTITY repmgr-primary-register SYSTEM "repmgr-primary-register.sgml">
|
<!ENTITY repmgr-primary-register SYSTEM "repmgr-primary-register.sgml">
|
||||||
|
|||||||
@@ -84,7 +84,6 @@
|
|||||||
&repmgrd-automatic-failover;
|
&repmgrd-automatic-failover;
|
||||||
&repmgrd-configuration;
|
&repmgrd-configuration;
|
||||||
&repmgrd-operation;
|
&repmgrd-operation;
|
||||||
&repmgrd-witness-server;
|
|
||||||
&repmgrd-bdr;
|
&repmgrd-bdr;
|
||||||
</part>
|
</part>
|
||||||
|
|
||||||
|
|||||||
@@ -13,36 +13,45 @@
|
|||||||
providing monitoring information about the state of each standby.
|
providing monitoring information about the state of each standby.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1 id="cascading-replication">
|
<sect1 id="repmgrd-witness-server" xreflabel="Using a witness server with repmgrd">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>repmgrd</primary>
|
<primary>repmgrd</primary>
|
||||||
<secondary>cascading replication</secondary>
|
<secondary>witness server</secondary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>cascading replication</primary>
|
<primary>witness server</primary>
|
||||||
<secondary>repmgrd</secondary>
|
<secondary>repmgrd</secondary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<title>repmgrd and cascading replication</title>
|
<title>Using a witness server with repmgrd</title>
|
||||||
<para>
|
<para>
|
||||||
Cascading replication - where a standby can connect to an upstream node and not
|
In a situation caused e.g. by a network interruption between two
|
||||||
the primary server itself - was introduced in PostgreSQL 9.2. &repmgr; and
|
data centres, it's important to avoid a "split-brain" situation where
|
||||||
<application>repmgrd</application> support cascading replication by keeping track of the relationship
|
both sides of the network assume they are the active segment and the
|
||||||
between standby servers - each node record is stored with the node id of its
|
side without an active primary unilaterally promotes one of its standbys.
|
||||||
upstream ("parent") server (except of course the primary server).
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In a failover situation where the primary node fails and a top-level standby
|
To prevent this situation happening, it's essential to ensure that one
|
||||||
is promoted, a standby connected to another standby will not be affected
|
network segment has a "voting majority", so other segments will know
|
||||||
and continue working as normal (even if the upstream standby it's connected
|
they're in the minority and not attempt to promote a new primary. Where
|
||||||
to becomes the primary node). If however the node's direct upstream fails,
|
an odd number of servers exists, this is not an issue. However, if each
|
||||||
the "cascaded standby" will attempt to reconnect to that node's parent
|
network has an even number of nodes, it's necessary to provide some way
|
||||||
(unless <varname>failover</varname> is set to <literal>manual</literal> in
|
of ensuring a majority, which is where the witness server becomes useful.
|
||||||
<filename>repmgr.conf</filename>).
|
</para>
|
||||||
|
<para>
|
||||||
|
This is not a fully-fledged standby node and is not integrated into
|
||||||
|
replication, but it effectively represents the "casting vote" when
|
||||||
|
deciding which network segment has a majority. A witness server can
|
||||||
|
be set up using <xref linkend="repmgr-witness-register">. Note that it only
|
||||||
|
makes sense to create a witness server in conjunction with running
|
||||||
|
<application>repmgrd</application>; the witness server will require its own
|
||||||
|
<application>repmgrd</application> instance.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
<sect1 id="repmgrd-network-split" xreflabel="Handling network splits with repmgrd">
|
<sect1 id="repmgrd-network-split" xreflabel="Handling network splits with repmgrd">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>repmgrd</primary>
|
<primary>repmgrd</primary>
|
||||||
@@ -96,4 +105,36 @@
|
|||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
|
<sect1 id="cascading-replication">
|
||||||
|
<indexterm>
|
||||||
|
<primary>repmgrd</primary>
|
||||||
|
<secondary>cascading replication</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
|
<indexterm>
|
||||||
|
<primary>cascading replication</primary>
|
||||||
|
<secondary>repmgrd</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
|
<title>repmgrd and cascading replication</title>
|
||||||
|
<para>
|
||||||
|
Cascading replication - where a standby can connect to an upstream node and not
|
||||||
|
the primary server itself - was introduced in PostgreSQL 9.2. &repmgr; and
|
||||||
|
<application>repmgrd</application> support cascading replication by keeping track of the relationship
|
||||||
|
between standby servers - each node record is stored with the node id of its
|
||||||
|
upstream ("parent") server (except of course the primary server).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
In a failover situation where the primary node fails and a top-level standby
|
||||||
|
is promoted, a standby connected to another standby will not be affected
|
||||||
|
and continue working as normal (even if the upstream standby it's connected
|
||||||
|
to becomes the primary node). If however the node's direct upstream fails,
|
||||||
|
the "cascaded standby" will attempt to reconnect to that node's parent
|
||||||
|
(unless <varname>failover</varname> is set to <literal>manual</literal> in
|
||||||
|
<filename>repmgr.conf</filename>).
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
<chapter id="repmgrd-witness-server" xreflabel="Using a witness server with repmgrd">
|
|
||||||
<indexterm>
|
|
||||||
<primary>repmgrd</primary>
|
|
||||||
<secondary>witness server</secondary>
|
|
||||||
</indexterm>
|
|
||||||
|
|
||||||
<title>Using a witness server with repmgrd</title>
|
|
||||||
<para>
|
|
||||||
In a situation caused e.g. by a network interruption between two
|
|
||||||
data centres, it's important to avoid a "split-brain" situation where
|
|
||||||
both sides of the network assume they are the active segment and the
|
|
||||||
side without an active primary unilaterally promotes one of its standbys.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
To prevent this situation happening, it's essential to ensure that one
|
|
||||||
network segment has a "voting majority", so other segments will know
|
|
||||||
they're in the minority and not attempt to promote a new primary. Where
|
|
||||||
an odd number of servers exists, this is not an issue. However, if each
|
|
||||||
network has an even number of nodes, it's necessary to provide some way
|
|
||||||
of ensuring a majority, which is where the witness server becomes useful.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
This is not a fully-fledged standby node and is not integrated into
|
|
||||||
replication, but it effectively represents the "casting vote" when
|
|
||||||
deciding which network segment has a majority. A witness server can
|
|
||||||
be set up using <xref linkend="repmgr-witness-register">. Note that it only
|
|
||||||
makes sense to create a witness server in conjunction with running
|
|
||||||
<application>repmgrd</application>; the witness server will require its own
|
|
||||||
<application>repmgrd</application> instance.
|
|
||||||
</para>
|
|
||||||
</chapter>
|
|
||||||
Reference in New Issue
Block a user