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

Commitb3bbebf

Browse files
committed
use regression database for regression tests
1 parentdd6023c commitb3bbebf

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

‎contrib/mmts/tests/reinit-mm.sh

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +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
39-
echo"raftable.id =$i">> node$i/postgresql.conf
40-
echo"raftable.peers = '$raft_conn_str'">> node$i/postgresql.conf
4136

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
4264
cp pg_hba.conf node$i
4365
pg_ctl -w -D node$i -l node$i.log start
4466
done
4567

4668
sleep 10
47-
psqlpostgres< ../../../regress.sql
69+
psqlregression< ../../../regress.sql
4870

4971
echo Done

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp