Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgresql find blocked query

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;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgresql #find #blocked #query
ADD COMMENT
Topic
Name
1+4 =