MarseyWorld/scripts/print_blocks.sh

2 lines
223 B
Bash
Raw Normal View History

2023-07-17 18:07:17 +00:00
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));";