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;
Created
September 25, 2019 15:10
-
-
Save andrefreitas/21e8120a9b0a9a7938085220d1442248 to your computer and use it in GitHub Desktop.
Postgres Admin Quickies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment