MarseyWorld/scripts/print_blocks.sh

2 lines
223 B
Bash
Executable File

psql "$DATABASE_URL" -c "SELECT activity.query AS blocked_query, blocking.query AS blocking_query FROM pg_stat_activity AS activity JOIN pg_stat_activity AS blocking ON blocking.pid = ANY(pg_blocking_pids(activity.pid));";