From 1729a549179341f3f1b00c27a8d0c6798ae20171 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Fri, 2 Aug 2024 14:22:40 -0500 Subject: [PATCH] Add temporal statement_timeout --- images/tiler-server/start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/images/tiler-server/start.sh b/images/tiler-server/start.sh index e77f0f6c..290ad0e2 100755 --- a/images/tiler-server/start.sh +++ b/images/tiler-server/start.sh @@ -6,7 +6,10 @@ while "$flag" = true; do pg_isready -h $POSTGRES_HOST -U $POSTGRES_USER -p $POSTGRES_PORT >/dev/null 2>&1 || continue flag=false echo "Running ANALYZE for tables" - time psql -U $POSTGRES_USER -h $POSTGRES_HOST -d $POSTGRES_DB -c "DO \$\$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public') LOOP EXECUTE 'ANALYZE ' || r.tablename; END LOOP; END \$\$;" + + # Set temporary statement_timeout + time psql -U $POSTGRES_USER -h $POSTGRES_HOST -d $POSTGRES_DB -c "SET statement_timeout = '300000'; DO \$\$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public') LOOP EXECUTE 'ANALYZE ' || r.tablename; END LOOP; END \$\$;" + export TEGOLA_SQL_DEBUG=LAYER_SQL:EXECUTE_SQL tegola serve --config=/opt/tegola_config/config.toml done \ No newline at end of file