Убить повисшие транзакции
/*SELECT pg_terminate_backend(pid)*/ SELECT * FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND state = 'idle in transaction' AND state_change < CURRENT_TIMESTAMP - INTERVAL '60' MINUTE
/*SELECT pg_terminate_backend(pid)*/ SELECT * FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND state = 'idle in transaction' AND state_change < CURRENT_TIMESTAMP - INTERVAL '60' MINUTE
Обсуждение