File tree 1 file changed +18
-18
lines changed
1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change 20
20
-- https://wiki.postgresql.org/wiki/Lock_Monitoring
21
21
22
22
SELECT
23
- t .schemaname ,
24
- t .relname ,
25
- -- l.database, -- id number is less useful, take schemaname from join instead
26
- l .locktype ,
27
- page,
28
- virtualtransaction,
29
- pid,
30
- mode,
31
- granted
23
+ t .schemaname ,
24
+ t .relname ,
25
+ -- l.database, -- id number is less useful, take schemaname from join instead
26
+ l .locktype ,
27
+ page,
28
+ virtualtransaction,
29
+ pid,
30
+ mode,
31
+ granted
32
32
FROM
33
- pg_locks l,
34
- -- pg_stat_user_tables t
35
- pg_stat_all_tables t
33
+ pg_locks l,
34
+ -- pg_stat_user_tables t
35
+ pg_stat_all_tables t
36
36
WHERE
37
- l .relation = t .relid
37
+ l .relation = t .relid
38
38
ORDER BY
39
- relation ASC ;
39
+ relation ASC ;
40
40
41
41
SELECT
42
- relation::regclass AS relation_regclass,
43
- *
42
+ relation::regclass AS relation_regclass,
43
+ *
44
44
FROM
45
- pg_locks
45
+ pg_locks
46
46
WHERE
47
- NOT granted;
47
+ NOT granted;
You can’t perform that action at this time.
0 commit comments