Clearing locks in Postgresql using psql
Occasionally I get into situations where an app has crashed and locked a row in a table. To figure out what locks are currently in place I run this command from psql: select * from pg_stat_activity where datname = ‘<some db I care about>’; Once I know which machine I want to target, I terminate[…]