forked from postgrespro/postgres_cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·60 lines (40 loc) · 1.51 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
./install/bin/pg_ctl -D ./install/data1 stop
./install/bin/pg_ctl -D ./install/data2 stop
# killall dtmd
rm -rf install
make install
# cd ~/code/pg_dtm/
cd contrib/pg_tsdtm/
# PATH=~/code/postgrespro2/install/bin:$PATH make clean
# PATH=~/code/postgrespro2/install/bin:$PATH make
# PATH=~/code/postgrespro2/install/bin:$PATH make install
make clean
make
make install
cd ~/code/postgrespro2/contrib/postgres_fdw/
make clean
make
make install
cd ../..
./install/bin/initdb -D ./install/data1
./install/bin/initdb -D ./install/data2
sed -i '' 's/#port =.*/port = 5433/' ./install/data2/postgresql.conf
sed -i '' 's/#fsync =.*/fsync = off/' ./install/data1/postgresql.conf
sed -i '' 's/#fsync =.*/fsync = off/' ./install/data2/postgresql.conf
echo 'dtm.node_id = 0' >> ./install/data1/postgresql.conf
echo 'dtm.node_id = 1' >> ./install/data2/postgresql.conf
echo 'autovacuum = off' >> ./install/data1/postgresql.conf
echo 'autovacuum = off' >> ./install/data2/postgresql.conf
echo "shared_preload_libraries = 'pg_dtm'" >> ./install/data1/postgresql.conf
echo "shared_preload_libraries = 'pg_dtm'" >> ./install/data2/postgresql.conf
echo "max_prepared_transactions = 400" >> ./install/data1/postgresql.conf
echo "max_prepared_transactions = 400" >> ./install/data2/postgresql.conf
./install/bin/pg_ctl -D ./install/data1 -l ./install/data1/log start
./install/bin/pg_ctl -D ./install/data2 -l ./install/data2/log start
# cd contrib/pg_dtm/dtmd
# make clean
# make
# rm -rf /tmp/clog/*
# mkdir -p /tmp/clog
# ./bin/dtmd