Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3e925b7

Browse files
committed
Trigger-based replication, 2pc.
1 parent 8c14bbb commit 3e925b7

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

devops/inventory

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ makejobs=4
2020
# pg_version_tag=REL_10_STABLE
2121
pg_repo=https://github.com/arssher/postgresql
2222
pg_version_tag=postgres_fdw_read_committed
23+
# postgres_fdw 2pc and triggers on fdw tables
24+
pg_version_tag=pg_shardman_tbr_2pc
2325
# pg_prefix="{{ansible_env.HOME}}/pg"
2426
pg_prefix="/tmp/pg"
2527
pg_src="{{pg_prefix}}/src"
@@ -37,6 +39,8 @@ pathman_version_tag=master
3739
shardman_repo=https://github.com/postgrespro/pg_shardman.git
3840
shardman_src="{{pg_prefix}}/pg_shardman"
3941
shardman_version_tag=master
42+
# trigger based replication
43+
# shardman_version_tag=tbr-2pc
4044

4145
shardman_shardlord_connstring="host={{ shardlord_ip }} port={{ pg_port }} user={{ ansible_user }}"
4246

devops/postgresql.conf.common.example

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ checkpoint_timeout = 60min
2828
max_wal_size = 100GB
2929
fsync = on
3030
autovacuum = off
31-
# synchronous_commit = on
32-
synchronous_commit = local
31+
synchronous_commit = on
32+
# synchronous_commit = local
3333

3434
shardman.shardlord_dbname = ubuntu
3535
shardman.poll_interval = 500 # long operations poll frequency in milliseconds
3636

37-
shardman.sync_replicas = off
37+
shardman.sync_replicas = on
38+
39+
max_prepared_transactions = 100000
40+
postgres_fdw.use_2pc = on
41+
postgres_fdw.use_repeatable_read = off

devops/provision.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
tags:
5050
- build_pg
5151

52-
- name: clone postgres sources
52+
- name: clone postgres sources {{ pg_repo }}/{{ pg_version_tag }}
5353
git: repo={{pg_repo}}
5454
dest={{pg_src}}
5555
version={{pg_version_tag}}
@@ -93,7 +93,7 @@
9393
tags:
9494
- build_pathman
9595

96-
- name: clone shardman
96+
- name: clone shardman {{ shardman_repo }}/{{ shardman_version_tag }}
9797
git: repo={{shardman_repo}}
9898
dest={{shardman_src}}
9999
version={{shardman_version_tag}}
@@ -193,7 +193,7 @@
193193
accept_hostkey=True
194194
tags: perf
195195

196-
- name: set PATH in .bashrc
196+
- name: set PATH to flamegraph in .bashrc
197197
lineinfile: dest=~/.bashrc line="export PATH={{ fg_path }}:$PATH"
198198
tags:
199199
- perf

0 commit comments

Comments
 (0)