查到对应的用户的活动连接:
select * from pg_stat_activity where username="xxx";
杀掉死锁的连接:
select pg_terminate_backend(pid)