如何杀掉PostgresSQL连接

发布于 2017-12-19 09:54:05

-- 查询连接
select * from pg_stat_activity;

-- 根据pid杀掉连接
select pg_terminate_backend(pid) from pg_stat_activity WHERE datname = '<DBName>';
comments powered by Disqus