From 019dc39e63a0d9ac448483ea25b602c8ca47f1fe Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Fri, 13 Mar 2020 13:48:35 +0000 Subject: [PATCH] updated postgres_foreach_table.sh --- postgres_foreach_table.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgres_foreach_table.sh b/postgres_foreach_table.sh index 0a0c921f..7624b685 100755 --- a/postgres_foreach_table.sh +++ b/postgres_foreach_table.sh @@ -46,5 +46,7 @@ while read -r db schema table; do query="${query//\{table\}/\"$table\"}" # doing \c $db is noisy "$srcdir/psql.sh" -q -t -d "$db" -c "$query" "$@" + # weird situation on RDS PostgreSQL, hanging all night trying to select count(*) a table, happens on many tables, skip them like so and carry on + #timeout -k 10 60 "$srcdir/psql.sh" -q -t -d "$db" -c "$query" "$@" || echo done | sed '/^[[:space:]]*$/d'