How to Find and Stop Running Queries on PostgreSQL – Adam Johnson

Your PostgreSQL server is seizing up, with some naughty queries consuming too many resources or blocking others. Don’t panic! You can stop those problem queries and stabilize your system.