From 3b82cea328b48a2f6fb9568cfa865eea15cfb936 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Fri, 20 Sep 2024 17:09:56 +0200 Subject: [PATCH] drop existing foreign tables cascadingly when switching to hourly format --- postgres-appliance/scripts/post_init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-appliance/scripts/post_init.sh b/postgres-appliance/scripts/post_init.sh index f04a50ff..0023e639 100755 --- a/postgres-appliance/scripts/post_init.sh +++ b/postgres-appliance/scripts/post_init.sh @@ -166,7 +166,7 @@ for i in $(seq 0 7); do daily_auth="CREATE OR REPLACE VIEW public.failed_authentication_${i} WITH (security_barrier) AS\n" daily_union="" - echo "DROP FOREIGN TABLE IF EXISTS public.postgres_log_${i};" + echo "DROP FOREIGN TABLE IF EXISTS public.postgres_log_${i} CASCADE;" for h in $(seq -w 0 23); do filter_logs="SELECT * FROM public.postgres_log_${i}_${h} WHERE command_tag = 'authentication' AND error_severity = 'FATAL'"