SELECT pid, state, wait_event_type, wait_event, queryCopy To Clipboard
FROM pg_stat_activity
WHERE state = ‘active’;
SELECT a.pid, a.wait_event, w.description
FROM pg_stat_activity a JOIN
pg_wait_events w ON (a.wait_event_type = w.type AND
a.wait_event = w.name)
WHERE a.wait_event is NOT NULL and a.state = 'active';Copy To Clipboard