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

Various experiments with PostgreSQL clustering

NotificationsYou must be signed in to change notification settings

postgrespro/postgres_cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An implementation of synchronousmulti-master replication based oncommit timestamps.

Usage

  1. Installcontrib/raftable andcontrib/mmts on each instance.
  2. Add these required options to thepostgresql.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
  1. Allow replication inpg_hba.conf.

Status functions

create extension mmts; to gain access to these functions:

  • mtm.get_nodes_state() -- show status of nodes on cluster
  • mtm.get_cluster_state() -- show whole cluster status
  • mtm.get_cluster_info() -- print some debug info
  • mtm.make_table_local(relation regclass) -- stop replication for a given table

Testing

  • 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors38


[8]ページ先頭

©2009-2025 Movatter.jp