1
1
#! /bin/bash
2
2
3
3
# This script performs regress tests at a master and mirrored it into the slave.
4
- U=` whoami `
4
+ U=regression
5
5
export LC_ALL=C
6
6
export LANGUAGE=" en_US:en"
7
7
@@ -12,6 +12,7 @@ LD_LIBRARY_PATH=$PGINSTALL/lib
12
12
remoteSrvName=fdwremote
13
13
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
14
14
export PATH=$PGINSTALL /bin:$PATH
15
+ export PGDATABASE=regression
15
16
16
17
pkill -9 postgres|| true
17
18
sleep 1
@@ -41,7 +42,7 @@ createdb -p 5433 $U
41
42
createdb -p 5432$U
42
43
43
44
psql -p 5432 -c" CREATE EXTENSION postgres_fdw;"
44
- psql -p 5432 -c" CREATE SERVER$remoteSrvName FOREIGN DATA WRAPPER postgres_fdw OPTIONS (port '5433', use_remote_estimate 'on');"
45
+ psql -p 5432 -c" CREATE SERVER$remoteSrvName FOREIGN DATA WRAPPER postgres_fdw OPTIONS (port '5433',dbname 'regression', use_remote_estimate 'on');"
45
46
psql -p 5432 -c" CREATE USER MAPPING FOR PUBLIC SERVER$remoteSrvName ;"
46
47
47
48
# Prepare plan execution
@@ -59,4 +60,4 @@ rm -rf $PGINSTALL/lib/regress.so
59
60
cp` pwd` /src/test/regress/regress.so$PGINSTALL /lib
60
61
cp` pwd` /src/test/regress/regress.so$PGINSTALL /lib/postgresql/
61
62
cd src/test/regress
62
- ./pg_regress --schedule=$SCRIPTS /serial_schedule --load-extension=postgres_fdw --load-extension=pg_execplan --load-extension=pg_repeater --dbname=andrey --use-existing
63
+ ./pg_regress --schedule=$SCRIPTS /serial_schedule --load-extension=postgres_fdw --load-extension=pg_execplan --load-extension=pg_repeater --dbname=regression --use-existing