pgsql死锁解决

select * from pg_stat_activity where datname = 'datname' and waiting_reason = 'lock';

根据查询结果中的pid值杀掉进程 select pg_terminate_backend(pid)

posted @ 2023-05-24 09:20  懂得归零  阅读(35)  评论(0编辑  收藏  举报