返回

Postgresql-为什么DROP VIEW命令挂起?

发布时间:2022-09-06 13:38:39 353
# 监控

我想做一个简单的表演DROP VIEW ...但它挂了。

我已经运行了这个查询SELECT * FROM pg_locks WHERE NOT granted摘自锁监控页面。

但是,他们建议的以下查询不会返回任何结果:

SELECT bl.pid     AS blocked_pid,
     a.usename  AS blocked_user,
     kl.pid     AS blocking_pid,
     ka.usename AS blocking_user,
     a.query    AS blocked_statement
FROM  pg_catalog.pg_locks         bl
JOIN pg_catalog.pg_stat_activity a  ON a.pid = bl.pid
JOIN pg_catalog.pg_locks         kl ON kl.transactionid = bl.transactionid AND kl.pid != bl.pid
JOIN pg_catalog.pg_stat_activity ka ON ka.pid = kl.pid
WHERE NOT bl.granted;

我现在应该去哪里?

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(2)
按点赞数排序
用户头像