Paste pg_locks output to visualize lock dependency chains.
SELECT blocked.pid, blocked.locktype, blocked.mode, blocked.granted, blocked.relation::regclass AS relation, blocking.pid AS blocking_pid, left(blocked_activity.query, 80) AS query, blocked_activity.datname FROM pg_locks blocked JOIN pg_locks blocking ON blocking.locktype = blocked.locktype AND blocking.relation = blocked.relation AND blocking.pid != blocked.pid AND blocking.granted LEFT JOIN pg_stat_activity blocked_activity ON blocked_activity.pid = blocked.pid WHERE NOT blocked.granted;
Start free with one primary or standalone PostgreSQL instance and all its databases. Monitoring, alerts, query insights, index advice, team access and every non-AI feature included. No replicas. No credit card required. New Free connections get seven days of full collection, then reduced sampling. Free and Pro include 30 days of monitoring history.