-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathrun_arrow_test.sh
More file actions
37 lines (28 loc) · 1.17 KB
/
run_arrow_test.sh
File metadata and controls
37 lines (28 loc) · 1.17 KB
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
#!/bin/bash
set -e
PORT=5434
HOST=/tmp
DB=postgres
echo "Compiling..."
make USE_PGXS=1 -s
sudo make install USE_PGXS=1 -s
if [ ! -d "test_db" ]; then
echo "Initializing test_db..."
/usr/lib/postgresql/15/bin/initdb -D test_db
fi
echo "Starting Postgres on $PORT..."
/usr/lib/postgresql/15/bin/pg_ctl -D test_db stop >/dev/null 2>&1 || true
/usr/lib/postgresql/15/bin/pg_ctl -D test_db -l logfile -o "-p $PORT -k $HOST" start
sleep 2
echo "Running Arrow Types Test..."
/usr/lib/postgresql/15/bin/psql -p $PORT -h $HOST -d $DB -f examples/14_arrow_vectorized_types.sql || true
echo "Running High Performance Insert Test..."
/usr/lib/postgresql/15/bin/psql -p $PORT -h $HOST -d $DB -f examples/15_high_performance_insert.sql || true
echo "Running Aggregate Pushdown Test..."
/usr/lib/postgresql/15/bin/psql -p $PORT -h $HOST -d $DB -f examples/16_aggregate_pushdown.sql || true
echo "Running Join Pushdown Test..."
/usr/lib/postgresql/15/bin/psql -p $PORT -h $HOST -d $DB -f examples/17_join_pushdown_test.sql || true
echo "Displaying Logfile (Errors):"
grep -iE "Error|Fatal|Panic|Seg" logfile || true
echo "Stopping Postgres..."
/usr/lib/postgresql/15/bin/pg_ctl -D test_db stop