File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ commit prepared ' x' ;
Original file line number Diff line number Diff line change
1
+ begin ;
2
+ insert into t values (42 );
3
+ prepare transaction ' x' ;
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ pkill -9 postgres
3
+ make install
4
+ rm -rf install/data
5
+ rm -rf install/data_slave
6
+ rm -rf /cores/*
7
+
8
+
9
+ # Node master
10
+ ./install/bin/initdb -D ./install/data
11
+ echo " max_prepared_transactions = 100" >> ./install/data/postgresql.conf
12
+ echo " shared_buffers = 512MB" >> ./install/data/postgresql.conf
13
+ echo " fsync = off" >> ./install/data/postgresql.conf
14
+ echo " log_checkpoints = on" >> ./install/data/postgresql.conf
15
+ echo " max_wal_size = 48MB" >> ./install/data/postgresql.conf
16
+ echo " min_wal_size = 32MB" >> ./install/data/postgresql.conf
17
+ echo " wal_level = hot_standby" >> ./install/data/postgresql.conf
18
+ echo " wal_keep_segments = 64" >> ./install/data/postgresql.conf
19
+ echo " max_wal_senders = 2" >> ./install/data/postgresql.conf
20
+ echo " max_replication_slots = 2" >> ./install/data/postgresql.conf
21
+
22
+ echo ' ' > ./install/data/logfile
23
+ echo ' local replication stas trust' >> ./install/data/pg_hba.conf
24
+
25
+ ./install/bin/pg_ctl -w -D ./install/data -l ./install/data/logfile start
26
+ ./install/bin/createdb stas
27
+ ./install/bin/psql -c " create table t(id int);"
28
+
29
+ ./install/bin/pg_basebackup -D ./install/data_slave/ -R
30
+
31
+ # Node slave
32
+ echo " port = 5433" >> ./install/data_slave/postgresql.conf
33
+ echo " hot_standby = on" >> ./install/data_slave/postgresql.conf
34
+ echo ' ' > ./install/data_slave/logfile
35
+ ./install/bin/pg_ctl -w -D ./install/data_slave -l ./install/data_slave/logfile start
36
+
37
+
You can’t perform that action at this time.
0 commit comments