Skip to content

Commit badb53f

Browse files
committed
updated postgres_locks.sql
1 parent 9f8d38e commit badb53f

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

postgres_locks.sql

+18-18
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@
2020
-- https://wiki.postgresql.org/wiki/Lock_Monitoring
2121

2222
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
3232
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
3636
WHERE
37-
l.relation = t.relid
37+
l.relation = t.relid
3838
ORDER BY
39-
relation ASC;
39+
relation ASC;
4040

4141
SELECT
42-
relation::regclass AS relation_regclass,
43-
*
42+
relation::regclass AS relation_regclass,
43+
*
4444
FROM
45-
pg_locks
45+
pg_locks
4646
WHERE
47-
NOT granted;
47+
NOT granted;

0 commit comments

Comments
 (0)