postgresql 强制断开指定数据库连接
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname=‘数据库名称’ AND pid<>pg_backend_pid();

更多推荐