PostgreSQL Drop DATABASE删除数据库失败,需要结束掉占用的连接
登录PostgreSQL后,执行:
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname='数据库名字' AND pid<>pg_backend_pid();