- Notifications
You must be signed in to change notification settings - Fork28
postgrespro/postgres_cluster
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
An implementation of synchronousmulti-master replication based oncommit timestamps.
- Install
contrib/raftable
andcontrib/mmts
on each instance. - Add these required options to the
postgresql.conf
of each instance in the cluster.
max_prepared_transactions = 200# should be > 0, because all# transactions are implicitly two-phasemax_connections = 200max_worker_processes = 100# at least (2 * n + p + 1)# this figure is calculated as:# 1 raftable worker# n-1 receiver# n-1 sender# 1 mtm-sender# 1 mtm-receiver# p workers in the poolmax_parallel_degree = 0wal_level = logical# multimaster is build on top of# logical replication and will not work otherwisemax_wal_senders = 10# at least the number of nodeswal_sender_timeout = 0default_transaction_isolation ='repeatable read'max_replication_slots = 10# at least the number of nodesshared_preload_libraries ='raftable,multimaster'multimaster.workers = 10multimaster.queue_size = 10485760# 10mbmultimaster.node_id = 1# the 1-based index of the node in the clustermultimaster.conn_strings ='dbname=... host=....0.0.1 port=... raftport=..., ...'# comma-separated list of connection stringsmultimaster.use_raftable =truemultimaster.heartbeat_recv_timeout = 1000multimaster.heartbeat_send_timeout = 250multimaster.ignore_tables_without_pk =truemultimaster.twopc_min_timeout = 2000
- Allow replication in
pg_hba.conf
.
create extension mmts;
to gain access to these functions:
mtm.get_nodes_state()
-- show status of nodes on clustermtm.get_cluster_state()
-- show whole cluster statusmtm.get_cluster_info()
-- print some debug infomtm.make_table_local(relation regclass)
-- stop replication for a given table
make -C contrib/mmts check
to run TAP-tests.make -C contrib/mmts xcheck
to run blockade tests. The blockade tests requiredocker
,blockade
, and some other packages installed, seerequirements.txt for the list. You might also want to gain superuser privileges to run these tests successfully.
About
Various experiments with PostgreSQL clustering
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.