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

Commit b7ad327

Browse files
committed
use regression database for regression tests
1 parent b991096 commit b7ad327

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

tests/reinit-mm.sh

+32-8
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,54 @@ for ((i=1;i<=n_nodes;i++))
1818
do
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
2528
done
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
3030
echo "Starting nodes..."
3131

3232
echo Start nodes
3333
for ((i=1;i<=n_nodes;i++))
3434
do
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
4266
done
4367

4468
sleep 10
45-
psql postgres < ../../../regress.sql
69+
psql regression < ../../../regress.sql
4670

4771
echo Done

0 commit comments

Comments
 (0)