在Coordinator上執行刪表操作
postgres=# drop table graph.r_credit_info;
程序一直卡著,查看Coordinator上的鎖,發現這個陳述句已經拿到這個物件的AccessExclusiveLock鎖
postgres=# select locktype,pid,relation,virtualtransaction,mode,granted from pg_locks where relation='16420';
locktype | pid | relation | virtualtransaction | mode | granted
----------+-------+----------+--------------------+---------------------+---------
relation | 64075 | 16420 | 97/766 | AccessExclusiveLock | t
(1 row)
但是在多個datanode上都發現有個沒有pid的行級排它鎖阻塞了這個ddl陳述句
postgres=# select locktype,pid,relation,virtualtransaction,mode,granted from pg_locks where relation='16420';
locktype | pid | relation | virtualtransaction | mode | granted
----------+-------+----------+--------------------+---------------------+---------
relation | 60435 | 16420 | 141/27963 | AccessExclusiveLock | f
relation | | 16420 | -1/31739584 | RowExclusiveLock | t
(2 rows)
嘗試過重啟集群,這個沒有pid的行級排他鎖一直存在。
現在這個表只能進行dml操作,但是無法進行ddl操作,各路大神有沒有解決的思路?在線等!
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/102461.html
標籤:PostgreSQL
