File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
usage () {
4
- echo " usage: $0 [-t BACKUP_TARGET ] [-l LOG_DIRECTORY] [-r retention ] <DATABASE> [DATABASE_N ...]"
4
+ echo " usage: $0 [-t TARGET_BACKUP_DIRECTORY ] [-l LOG_DIRECTORY] [-r RETENTION ] <DATABASE> [DATABASE_N ...]"
5
5
exit 1
6
6
}
7
7
Original file line number Diff line number Diff line change 2
2
3
3
usage () {
4
4
cat << EOF
5
- echo "usage: $0 <table set > [sleep duration ]"
6
- where <table set > is one of: facts catalogs other
7
- and [sleep duration ] is an optional integer of seconds to sleep. Defaults to 300
5
+ echo "usage: $0 <TABLE_SET > [SLEEP_DURATION ]"
6
+ where <TABLE_SET > is one of: facts catalogs other
7
+ and [SLEEP_DURATION ] is an optional integer of seconds to sleep. Defaults to 300
8
8
EOF
9
9
exit 1
10
10
}
@@ -27,14 +27,14 @@ case "$1" in
27
27
usage
28
28
esac
29
29
30
-
31
30
SQL=" SELECT t.relname::varchar AS table_name
32
31
FROM pg_class t
33
32
JOIN pg_namespace n
34
33
ON n.oid = t.relnamespace
35
34
WHERE t.relkind = 'r'
36
35
AND t.relname IN ( $( IFS=,; echo " ${vacuum_tables[*]} " ) )"
37
36
37
+ # shellcheck disable=SC2207
38
38
tables=($( su - pe-postgres -s /bin/bash -c " /opt/puppetlabs/server/bin/psql -d pe-puppetdb -c \" $SQL \" --tuples-only" ) )
39
39
40
40
for table in " ${tables[@]} " ; do
You can’t perform that action at this time.
0 commit comments