A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Find and kill slow postgres queries
SELECT query_start,datname,procpid,current_query FROM pg_stat_activity;
SELECT NOW();
SELECT pg_cancel_backend($PID);
-- where $PID is the number from the procpid column in the first query
Labels:
databases,
kill,
performance,
postgresql,
process,
query,
slow