@@ -18,30 +18,54 @@ for ((i=1;i<=n_nodes;i++))
1818do
1919 port=$(( 5431 + i))
2020 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"
2222 raft_conn_str=" $raft_conn_str ${sep}${i} :localhost:$raft_port "
2323 sep=" ,"
2424 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
2528done
2629
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
3030echo " Starting nodes..."
3131
3232echo Start nodes
3333for (( i= 1 ;i<= n_nodes;i++ ))
3434do
3535 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
3936
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
4064 cp pg_hba.conf node$i
4165 pg_ctl -w -D node$i -l node$i .log start
4266done
4367
4468sleep 10
45- psql postgres < ../../../regress.sql
69+ psql regression < ../../../regress.sql
4670
4771echo Done
0 commit comments