-
Notifications
You must be signed in to change notification settings - Fork 73
/
cleanup_set
executable file
·22 lines (20 loc) · 1021 Bytes
/
cleanup_set
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
source ./config
source ./param
TEST=$1
if [ -n "$2" ] ; then
SERVERNAME=$2
fi
echo $SERVERNAME
exit
pushd "results/${SERVERNAME}"
psql -d results -At -c "SELECT test FROM tests WHERE server='${SERVERNAME}' AND test=$TEST" | xargs rm -rf
psql -d results -At -c "DELETE FROM test_bgwriter WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_stat_database WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_statio WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM tests WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_metrics_data WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_settings WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_statements WHERE server='${SERVERNAME}' AND test=$TEST"
psql -d results -At -c "DELETE FROM test_buffercache WHERE server='${SERVERNAME}' AND test=$TEST"
popd