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
Multi-master isanextensionandset of patchesto a Postegres database,that turnsPostgres into a synchronous shared-nothing cluster to provide OLTP scalability and high availability with automatic disaster recovery.
3
+
`multimaster` isa PostgreSQLextensionwith aset of patches that turnsPostgreSQL into a synchronous shared-nothing cluster to provideOnline Transaction Processing (OLTP) scalability and high availability with automatic disaster recovery.
4
4
5
5
6
6
##Features
@@ -14,24 +14,24 @@ Multi-master is an extension and set of patches to a Postegres database, that tu
14
14
15
15
##Overview
16
16
17
-
Multi-masterreplicates same database to all nodesincluster and allowswrites toeach node.Transaction isolation is enforced cluster-wide, soin case of concurrent updates on different nodes database will use the same conflict resolution rules (mvcc withrepeatable read isolation level) as single node uses for concurrent backends and always stays in consistent state. Anywriting transactionwill writeto all nodes,hence increasing commit latency foramount oftimeproportional to roundtrip between nodes neddedfor synchronization. Readonly transactions and queries executed locally without measurable overhead.Replication mechanism itself based on logical decoding and earlier version of pglogical extension provided for community by 2ndQuadrant team.
17
+
The`multimaster` extensionreplicatesthesame database to all nodesof thecluster and allowswrite transactions oneach node.To ensure data consistencyinthecase of concurrent updates,`multimaster` enforces transaction isolation cluster-wide, using multiversion concurrency control (MVCC) at therepeatable read isolation level. Anywrite transactionis synchronously replicatedto all nodes,which increases commit latency forthetimerequiredfor synchronization. Read-only transactions and queriesareexecuted locally, withoutanymeasurable overhead.
18
18
19
-
Cluster consistingofN nodes can continue to work while majority of initial nodes are alive and reachable by other nodes. This is done by using 3 phase commit protocolandheartbeats for failure discovery. Node thatisbrought backto clustercanbe fast-forwadedto actual stateautomatically in case whentransactions logstill exists sincethe time when node was excluded from cluster (that is configurable).
19
+
To ensure high availability and fault toleranceofthe cluster,`multimaster` uses three-phase commit protocol and heartbeats for failure discovery. A multi-master cluster of N nodes can continue working while the majority of the nodes are aliveandreachable by other nodes. When the nodeisreconnectedtothecluster,`multimaster`canautomatically fast-forward the nodetotheactual statebased on thetransactions log(WAL). If WAL is no longer available forthe time whenthenode was excluded fromthecluster, you can restore the node using`pg_basebackup`.
20
20
21
+
For details on the`multimaster` internals, see the[Architecture](/contrib/mmts/doc/architecture.md) page.
1.[Adding New Nodes to the Cluster](doc/administration.md#adding-new-nodes-to-the-cluster)
31
+
1.[Excluding Nodes from the Cluster](doc/administration.md#excluding-nodes-from-the-cluster)
32
+
1.[Architecture](doc/architecture.md)
33
+
1.[Configuration Variables](doc/configuration.md)
34
+
1.[Built-in Functions and Views](doc/functions.md)
35
35
36
36
37
37
##Tests
@@ -47,18 +47,26 @@ Cluster consisting of N nodes can continue to work while majority of initial nod
47
47
48
48
##Limitations
49
49
50
-
* Commit latency.
51
-
Current implementation of logical replication sends data to subscriber nodes only after local commit, so in case of heavy-write transaction user will wait for transaction processing two times: on local node and on all other nodes (simultaneosly). We have plans to address this issue in future.
50
+
*`multimaster` can only replicate one database per cluster.
51
+
52
+
* The replicated tables must have primary keys. Otherwise,`multimaster` cannot perform logical replication.
52
53
53
54
* DDL replication.
54
-
While data is replicated on logical level, DDL replicated by statements performing distributed commit with the same statement. Some complex DDL scenarious including stored procedures and temp temp tables can work differently comparing to standalone postgres. We are working right now on proving full compatibility with ordinary postgres. Currently we are passing 162 of 166 postgres regression tests.
55
+
While`multimaster` replicates data on the logical level, DDL is replicated on the statement level, which causes distributed commits of the same statement on different nodes. As a result, complex DDL scenarios, such as stored procedures and temporary tables, may work differently as compared to the standard PostgreSQL.
56
+
57
+
* Commit latency.
58
+
The current implementation of logical replication sends data to subscriber nodes only after the local commit. In case of a heavy-write transaction, you have to wait for transaction processing twice: on the local node and on all the other nodes (simultaneously).
55
59
56
60
* Isolation level.
57
-
Multimaster currently support only_repeatable__read_ isolation level. This is stricter than default_read__commited_, but also increases probability of serialization failure during commit._Serializable_ level isn't supported yet.
61
+
The`multimaster` extenstion currently supports only the_repeatable__read_ isolation level. This is stricter than the default_read__commited_ level, but also increases probability of serialization failure during commit._Serializable_ level is not supported yet.
62
+
58
63
59
-
* One database per cluster.
64
+
##Compatibility
65
+
The`multimaster` extension currently passes 162 of 166 postgres regression tests. We are working right now on proving full compatibility with the standard PostgreSQL.
60
66
67
+
##Authors
61
68
62
-
##Credits and Licence
69
+
Postgres Professional, Moscow, Russia.
63
70
64
-
Multi-master developed by the PostgresPro team.
71
+
###Credits
72
+
The replication mechanism is based on logical decoding and an earlier version of the`pglogical` extension provided for community by the 2ndQuadrant team.