Monthly Archives: July 2016

Show postgres lock

You’re staring at a query that won’t finish, or a deploy that hangs on a migration, or a UI request that just sits there. Postgres is almost certainly waiting on a lock that another transaction holds. The classic query for … Continue reading

Posted in Database, PostgreSQL | Leave a comment

Check all table size in Postgres

You want a quick “which tables are eating my disk?” overview — usually before a vacuum, an archive purge, or a capacity-planning conversation. Here’s a one-shot query that joins information_schema.tables against pg_class to show every public table with its estimated … Continue reading

Posted in Database, PostgreSQL | Leave a comment