How to detect query which holds the lock in Postgres?
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
How to detect query which holds the lock in Postgres?
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
For further actions, you may consider blocking this person and/or reporting abuse
Mike Houngbadji -
Sospeter Mong'are -
KateMLady -
Melody Mbewe -
Top comments (0)