@@ -18,30 +18,54 @@ for ((i=1;i<=n_nodes;i++))
18
18
do
19
19
port=$(( 5431 + i))
20
20
raft_port=$(( 6665 + i))
21
- conn_str=" $conn_str ${sep} dbname=postgres host=localhost port=$port sslmode=disable"
21
+ conn_str=" $conn_str ${sep} dbname=regression host=localhost port=$port sslmode=disable"
22
22
raft_conn_str=" $raft_conn_str ${sep}${i} :localhost:$raft_port "
23
23
sep=" ,"
24
24
initdb node$i
25
+ pg_ctl -w -D node$i -l node$i .log start
26
+ createdb regression
27
+ pg_ctl -w -D node$i -l node$i .log stop
25
28
done
26
29
27
- # echo Start DTM
28
- # ~/postgres_cluster/contrib/arbiter/bin/arbiter -r 0.0.0.0:5431 -i 0 -d dtm 2> dtm.log &
29
- # sleep 2
30
30
echo " Starting nodes..."
31
31
32
32
echo Start nodes
33
33
for (( i= 1 ;i<= n_nodes;i++ ))
34
34
do
35
35
port=$(( 5431 + i))
36
- sed " s/5432/$port /g" < postgresql.conf.mm > node$i /postgresql.conf
37
- echo " multimaster.conn_strings = '$conn_str '" >> node$i /postgresql.conf
38
- echo " multimaster.node_id = $i " >> node$i /postgresql.conf
39
36
37
+ cat << SQL > node$i /postgresql.conf
38
+ listen_addresses='*'
39
+ port = '$port '
40
+ max_prepared_transactions = 100
41
+ synchronous_commit = on
42
+ fsync = off
43
+ wal_level = logical
44
+ max_worker_processes = 15
45
+ max_replication_slots = 10
46
+ max_wal_senders = 10
47
+ shared_preload_libraries = 'raftable,multimaster'
48
+ default_transaction_isolation = 'repeatable read'
49
+ log_checkpoints = on
50
+ log_autovacuum_min_duration = 0
51
+ multimaster.workers = 1
52
+ multimaster.use_raftable = true
53
+ multimaster.queue_size=52857600
54
+ multimaster.ignore_tables_without_pk = 1
55
+ multimaster.heartbeat_recv_timeout = 1000
56
+ multimaster.heartbeat_send_timeout = 250
57
+ multimaster.twopc_min_timeout = 400000
58
+
59
+ multimaster.conn_strings = '$conn_str '
60
+ multimaster.node_id = $i
61
+ raftable.id = $i
62
+ raftable.peers = '$raft_conn_str '
63
+ SQL
40
64
cp pg_hba.conf node$i
41
65
pg_ctl -w -D node$i -l node$i .log start
42
66
done
43
67
44
68
sleep 10
45
- psql postgres < ../../../regress.sql
69
+ psql regression < ../../../regress.sql
46
70
47
71
echo Done
0 commit comments