Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit96e2407

Browse files
committed
readme
1 parent2cb2913 commit96e2407

File tree

1 file changed

+30
-61
lines changed

1 file changed

+30
-61
lines changed

‎README.md

Lines changed: 30 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,74 +10,43 @@ This is mirror of postgres repo with several changes to the core and few extra e
1010

1111
* Transaction manager interface (eXtensible Transaction Manager, xtm). Generic interface to plug distributed transaction engines. More info at[[https://wiki.postgresql.org/wiki/DTM]] and[[http://www.postgresql.org/message-id/flat/F2766B97-555D-424F-B29F-E0CA0F6D1D74@postgrespro.ru]].
1212
* Distributed deadlock detection API.
13-
* Fast 2pc patch. More info at[[http://www.postgresql.org/message-id/flat/74355FCF-AADC-4E51-850B-47AF59E0B215@postgrespro.ru]]
13+
* Logical decoding of two-phase transactions.
14+
1415

1516
##New extensions:
1617

17-
* pg_dtm. Transaction management by interaction with standalone coordinator (Arbiter or dtmd).[[https://wiki.postgresql.org/wiki/DTM#DTM_approach]]
1818
* pg_tsdtm. Coordinator-less transaction management by tracking commit timestamps.
1919
* multimaster. Synchronous multi-master replication based on logical_decoding and pg_dtm.
2020

2121

2222
##Changed extension:
2323

24-
* postgres_fdw. Added support of pg_dtm.
25-
26-
##Deploying
27-
28-
For deploy and test postgres over a cluster we use ansible. In each extension directory one can find test subdirectory where we are storing tests and deploy scripts.
29-
30-
31-
###Running tests on local cluster
32-
33-
To use it one need ansible hosts file with following groups:
34-
35-
farms/cluster.example:
36-
```
37-
[clients] # benchmark will start simultaneously on that nodes
38-
server0.example.com
39-
[nodes] # all that nodes will run postgres, dtmd/master will be deployed to first
40-
server1.example.com
41-
server2.example.com
42-
server3.example.com
43-
```
44-
45-
After you have proper hosts file you can deploy all stuff to servers:
46-
47-
```shell
48-
# cd pg_dtm/tests
49-
# ansible-playbook -i farms/sai deploy_layouts/cluster.yml
50-
```
51-
52-
To perform dtmbench run:
53-
54-
```shell
55-
# ansible-playbook -i farms/sai perf.yml -e nnodes=3 -e nconns=100
56-
```
57-
58-
here nnodes is number of nudes that will be used for that test, nconns is the
59-
number of connections to the backend.
60-
61-
62-
63-
##Running tests on Amazon ec2
64-
65-
66-
In the case of amazon cloud there is no need in specific hosts file. Instead of it
67-
we use script farms/ec2.py to get current instances running on you account. To use
68-
that script you need to specify you account key and access_key in~/.boto.cfg (or in
69-
any other place that described athttp://boto.cloudhackers.com/en/latest/boto_config_tut.html)
24+
* postgres_fdw. Added support of pg_tsdtm.
25+
26+
##Installing multimaster
27+
28+
1. Build and install postgres from this repo on all machines in cluster.
29+
1. Install contrib/raftable and contrib/mmts extensions.
30+
1. Right now we need clean postgres installation to spin up multimaster cluster.
31+
1. Create required database inside postgres before enabling multimaster extension.
32+
1. We are requiring following postgres configuration:
33+
1. 'max_prepared_transactions' > 0 -- in multimaster all writing transaction along with ddl are wrapped as two-phase transaction, so this number will limit maximum number of writing transactions in this cluster node.
34+
1. 'synchronous_commit - off' -- right now we do not support async commit. (one can enable it, but that will not bring desired effect)
35+
1. 'wal_level = logical' -- multimaster built on top of logical replication so this is mandatory.
36+
1. 'max_wal_senders' -- this should be at least number of nodes - 1
37+
1. 'max_replication_slots' -- this should be at least number of nodes - 1
38+
1. 'max_worker_processes' -- at least 2*N + P - 1, where N is number of nodes in cluster, P size of pool of workers(see below) (1 raftable, n-1 receiver, n-1 sender, mtm-sender, mtm-receiver, + number of pool worker).
39+
1. 'default_transaction_isolation = 'repeatable read'' -- multimaster isn't supporting default read commited level.
40+
1. Also multimaster have following configuration parameters:
41+
1. 'multimaster.conn_strings' -- connstrings for all nodes in cluster, separated by comma.
42+
1. 'multimaster.node_id' -- id of current node, number starting from one.
43+
1. 'multimaster.workers' -- number of workers that can apply transactions from neighbouring nodes.
44+
1. 'multimaster.use_raftable = true' -- just set this to true. Deprecated.
45+
1. 'multimaster.queue_size = 52857600' -- queue size for applying transactions from neighbouring nodes.
46+
1. 'multimaster.ignore_tables_without_pk = 1' -- do not replicate tables without primary key
47+
1. 'multimaster.heartbeat_send_timeout = 250' -- heartbeat period (ms).
48+
1. 'multimaster.heartbeat_recv_timeout = 1000' -- disconnect node if we miss heartbeats all that time (ms).
49+
1. 'multimaster.twopc_min_timeout = 40000' -- rollback stalled transaction after this period (ms).
50+
1. 'raftable.id' -- id of current node, number starting from one.
51+
1. 'raftable.peers' -- id of current node, number starting from one.
7052

71-
To create VMs in cloud run:
72-
```shell
73-
# ansible-playbook -i farms/ec2.py deploy_layouts/ec2.yml
74-
```
75-
After that you should wait few minutes to have info about that instances in Amazon API. After
76-
that you can deploy postgres as usual:
77-
```shell
78-
# ansible-playbook -i farms/ec2.py deploy_layouts/cluster-ec2.yml
79-
```
80-
And to run a benchmark:
81-
```shell
82-
# ansible-playbook -i farms/sai perf-ec2.yml -e nnodes=3 -e nconns=100
83-
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp