@@ -6,37 +6,37 @@ An implementation of synchronous multi-master replication based on **logical dec
6
6
7
7
1 . Install ` contrib/raftable ` and ` contrib/mmts ` on each instance.
8
8
1 . Add these required options to the ` postgresql.conf ` of each instance in the cluster.
9
- ```sh
10
- max_prepared_transactions = 200 # should be > 0, because all
11
- # transactions are implicitly two-phase
12
- max_connections = 200
13
- max_worker_processes = 100 # at least (2 * n + p + 1)
14
- # this figure is calculated as:
15
- # 1 raftable worker
16
- # n-1 receiver
17
- # n-1 sender
18
- # 1 mtm-sender
19
- # 1 mtm-receiver
20
- # p workers in the pool
21
- max_parallel_degree = 0
22
- wal_level = logical # multimaster is build on top of
23
- # logical replication and will not work otherwise
24
- max_wal_senders = 10 # at least the number of nodes
25
- wal_sender_timeout = 0
26
- default_transaction_isolation = 'repeatable read'
27
- max_replication_slots = 10 # at least the number of nodes
28
- shared_preload_libraries = 'raftable,multimaster'
29
- multimaster.workers = 10
30
- multimaster.queue_size = 10485760 # 10mb
31
- multimaster.node_id = 1 # the 1-based index of the node in the cluster
32
- multimaster.conn_strings = 'dbname=... host=....0.0.1 port=... raftport=..., ...'
33
- # comma-separated list of connection strings
34
- multimaster.use_raftable = true
35
- multimaster.heartbeat_recv_timeout = 1000
36
- multimaster.heartbeat_send_timeout = 250
37
- multimaster.ignore_tables_without_pk = true
38
- multimaster.twopc_min_timeout = 2000
39
- ```
9
+ ``` sh
10
+ max_prepared_transactions = 200 # should be > 0, because all
11
+ # transactions are implicitly two-phase
12
+ max_connections = 200
13
+ max_worker_processes = 100 # at least (2 * n + p + 1)
14
+ # this figure is calculated as:
15
+ # 1 raftable worker
16
+ # n-1 receiver
17
+ # n-1 sender
18
+ # 1 mtm-sender
19
+ # 1 mtm-receiver
20
+ # p workers in the pool
21
+ max_parallel_degree = 0
22
+ wal_level = logical # multimaster is build on top of
23
+ # logical replication and will not work otherwise
24
+ max_wal_senders = 10 # at least the number of nodes
25
+ wal_sender_timeout = 0
26
+ default_transaction_isolation = ' repeatable read'
27
+ max_replication_slots = 10 # at least the number of nodes
28
+ shared_preload_libraries = ' raftable,multimaster'
29
+ multimaster.workers = 10
30
+ multimaster.queue_size = 10485760 # 10mb
31
+ multimaster.node_id = 1 # the 1-based index of the node in the cluster
32
+ multimaster.conn_strings = ' dbname=... host=....0.0.1 port=... raftport=..., ...'
33
+ # comma-separated list of connection strings
34
+ multimaster.use_raftable = true
35
+ multimaster.heartbeat_recv_timeout = 1000
36
+ multimaster.heartbeat_send_timeout = 250
37
+ multimaster.ignore_tables_without_pk = true
38
+ multimaster.twopc_min_timeout = 2000
39
+ ```
40
40
1 . Allow replication in ` pg_hba.conf ` .
41
41
42
42
## Status functions
0 commit comments