This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE VIEW lock_monitor AS | |
SELECT COALESCE(((blockingl.relation)::regclass)::text, blockingl.locktype) AS locked_item, | |
(now() - blockeda.query_start) AS waiting_duration, | |
blockeda.pid AS blocked_pid, | |
blockeda.query AS blocked_query, | |
blockedl.mode AS blocked_mode, | |
blockinga.pid AS blocking_pid, | |
blockinga.query AS blocking_query, | |
blockingl.mode AS blocking_mode | |
FROM (((pg_locks blockedl |