|
| 1 | +#!/bin/sh |
| 2 | + |
| 3 | +# this script assumes that postgres and test_decodong is installed |
| 4 | +# (srcdir)/tmp_install |
| 5 | + |
| 6 | +rm -rf tmp_install/data1 |
| 7 | +./tmp_install/bin/initdb -D ./tmp_install/data1 |
| 8 | +./tmp_install/bin/pg_ctl -w -D ./tmp_install/data1 -l logfile start |
| 9 | +./tmp_install/bin/createdb regression |
| 10 | + |
| 11 | +cat>> ./tmp_install/data1/postgresql.conf<<-CONF |
| 12 | + wal_level=logical |
| 13 | + max_replication_slots=4 |
| 14 | + max_prepared_transactions=20 |
| 15 | + shared_preload_libraries='test_decoding' |
| 16 | + wal_sender_timeout=600000 |
| 17 | +CONF |
| 18 | +./tmp_install/bin/pg_ctl -w -D ./tmp_install/data1 -l logfile restart |
| 19 | + |
| 20 | +python3 repconsumer.py> xlog_decoded& |
| 21 | +REPCONSUMER_PID=$! |
| 22 | + |
| 23 | +sleep 3 |
| 24 | + |
| 25 | +cd src/test/regress |
| 26 | + |
| 27 | +# ./pg_regress --inputdir=. --bindir='../../../tmp_install/bin' --dlpath=. --schedule=./parallel_schedule --use-existing |
| 28 | + |
| 29 | +./pg_regress --inputdir=. --bindir='../../../tmp_install/bin' --dlpath=. --schedule=./serial_schedule --use-existing |
| 30 | + |
| 31 | +cd ../../.. |
| 32 | + |
| 33 | +kill$REPCONSUMER_PID |
| 34 | +./tmp_install/bin/pg_ctl -D ./tmp_install/data1 -l logfile stop |