postgresql 死锁处理

-- 查询被锁住的表
(SELECT pid FROM pg_stat_activity where query ~ 'fzqh_3_fzqhjg_1_45947')
-- 中止进程
select pg_terminate_backend((SELECT pid FROM pg_stat_activity where query ~ 'fzqh_3_fzqhjg_1_45947' LIMIT 1));

  

原文地址:https://www.cnblogs.com/412013cl/p/15628467.html