You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/sgml/multimaster.sgml
+38-37Lines changed: 38 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<title>multimaster</title>
3
3
<para>
4
4
<filename>multimaster</filename> is a <productname>&productname;</productname> extension with a set
5
-
of patches that turns <productname>PostgreSQL</productname> into a synchronous shared-nothing
5
+
of patches that turns <productname>&productname;</productname> into a synchronous shared-nothing
6
6
cluster to provide Online Transaction Processing (<acronym>OLTP</acronym>) scalability for read transactions and high availability with automatic disaster recovery.</para>
7
7
<para> As compared to a standard <productname>PostgreSQL</productname> master-slave cluster, a cluster configured with the <filename>multimaster</filename> extension offers the following benefits:</para>
8
8
<itemizedlist>
@@ -47,7 +47,7 @@
47
47
<para>
48
48
To ensure high availability and fault tolerance of the cluster,
<filename>multimaster</filename> supports only the <literal>repeatable read</literal> isolation level. You cannot set up <filename>multimaster</filename> with the default <literal>read committed</literal> level.
128
129
</para>
129
130
</listitem>
@@ -142,12 +143,12 @@ max_replication_slots = 10 # at least the number of nodes
142
143
You must change the replication level to
143
144
<literal>logical</literal> as
144
145
<filename>multimaster</filename> relies on logical
145
-
replication. For a cluster of N nodes, enable at least N
146
+
replication. For a cluster of <replaceable>N</replaceable> nodes, enable at least <replaceable>N</replaceable>
146
147
WAL sender processes and replication slots. Since
147
148
<filename>multimaster</filename> implicitly adds a
148
149
<literal>PREPARE</literal> phase to each
149
150
<literal>COMMIT</literal> transaction, make sure to set
150
-
the number of prepared transactions to N*<varname>max_connections</varname>.
151
+
the number of prepared transactions to <replaceable>N</replaceable>*<varname>max_connections</varname>.
151
152
Otherwise, prepared transactions may be queued.
152
153
</para>
153
154
</listitem>
@@ -178,11 +179,12 @@ max_worker_processes = 250
178
179
</para>
179
180
<programlisting>
180
181
multimaster.max_nodes = 3 # cluster size
181
-
multimaster.node_id = 1 # the 1-based index of the node
182
+
multimaster.node_id = 1 # the 1-based index of this node
@@ -333,7 +335,7 @@ SELECT * FROM mtm.get_cluster_state();
333
335
</sect4>
334
336
</sect3>
335
337
</sect2>
336
-
<sect2 id="multimaster-usage" xreflabel="Using multimaster for Data Replication">
338
+
<sect2 id="multimaster-usage">
337
339
<title>Using multimaster for Data Replication</title>
338
340
<para>The <filename>multimaster</filename> extension takes care of the database replication in a fully automated way. You can perform write transactions on any node, and work with temporary tables on each cluster node simultaneosly. However, make sure to take the following replication restrictions into account:</para>
339
341
<itemizedlist>
@@ -345,8 +347,8 @@ SELECT * FROM mtm.get_cluster_state();
345
347
</listitem>
346
348
<listitem>
347
349
<para>
348
-
The replicated tables must have primary keys or replica identity. By default,
349
-
<filename>multimaster</filename> does not allow replication for such tables
350
+
The replicated tables must have primary keys or replica identity. Otherwise,
351
+
<filename>multimaster</filename> will not allow replication
350
352
because of the logical replication restrictions. Unlogged tables are not replicated, as in the standard <productname>PostgreSQL</productname>.
351
353
</para>
352
354
<note><para>You can enable replication
@@ -475,7 +477,7 @@ SELECT * FROM mtm.add_node('dbname=mydb user=myuser host=node4');
475
477
Connect to the new node and clone all the data from one of the alive nodes to the new node:
All the cluster nodes get locked for write transactions until the new node retrieves all the updates that happened after you started making a base backup.
All the cluster nodes get locked for write transactions until the restored node retrieves all the updates that happened after you started making a base backup.
To complete the transaction, the arbiter must receive a response
676
-
from the majority of the nodes. For example, for a cluster of 2N +
677
-
1 nodes, at least N+1 responses are required. Thus, <filename>multimaster</filename> ensures that
678
+
from the majority of the nodes. For example, for a cluster of 2<replaceable>N</replaceable>+1 nodes, at least <replaceable>N</replaceable>+1 responses are required. Thus, <filename>multimaster</filename> ensures that
678
679
your cluster is available for reads and writes while the majority
679
680
of the nodes are connected, and no data inconsistencies occur in
680
681
case of a node or connection failure. For details on the failure
0 commit comments