Diagnostic step 1
Check for long-lived transactions: run SELECT pid, state, query_start, age(now(), query_start) FROM pg_stat_activity WHERE state <> 'idle' OR query_start IS NOT NULL; if any long-running non-idle queries exist, identify and coordinate safe termination.