1. 查询
SELECT pid FROM pg_stat_activity WHERE datname='数据库名'
2. 杀掉
SELECT pg_terminate_backend(pid);
1. 查询
SELECT pid FROM pg_stat_activity WHERE datname='数据库名'
2. 杀掉
SELECT pg_terminate_backend(pid);
转载于:https://my.oschina.net/ayy/blog/1813265