a guest Oct 14th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Find if a query is blocked by another
  2. ```sql
  3. select pid,
  4.        usename,
  5.        pg_blocking_pids(pid) as blocked_by,
  6.        query as blocked_query
  7. from pg_stat_activity
  8. where cardinality(pg_blocking_pids(pid)) > 0;
  9. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand