–查询是否锁表了
select oid from pg_class where relname=’可能锁表了的表’
select pid from pg_locks where relation=’上面查出的oid’
–如果查询到了结果,表示该表被锁 则需要释放锁定
select pg_cancel_backend(上面查到的pid)
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/5768.html
–查询是否锁表了
select oid from pg_class where relname=’可能锁表了的表’
select pid from pg_locks where relation=’上面查出的oid’
–如果查询到了结果,表示该表被锁 则需要释放锁定
select pg_cancel_backend(上面查到的pid)
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/5768.html