Today I Learned

hashrocket A Hashrocket project

Some connections are just hangin' KILL THEM

Jake has covered in the past how to see connections and their queries in postgres with

select * from pg_stat_activity;

It returns a pid column and now you can use that pid to do these processes harm.

select pg_terminate_backend(pid) from pg_stat_activity where THERES THAT QUERY GET IT
See More #sql TILs
Looking for help? Hashrocket developers believe that data quality is as important as code quality. We enjoy all the challenges of relational databases, from finding the fastest index, to structuring data to fit the needs of an application. We're eager to share our experiences; check out PG Casts, our series of free PostgreSQL screencasts.