Thread: locking/waiting queries

locking/waiting queries

From
Kevin Kempter
Date:
Hi all ;

were seeing a backlog of queries in pg_stat_activity. The system has slowed
big time.

I see many many queries where waiting = 't'

I want to find out for each query which query they are waiting on (who's doing
the blocking).

What's the best way to find this, I looked at pg_locks for rows where granted =
'f' but its not helping me determine which query is doing the blocking.

Thanks in advance...