collect-wait-events.sh
application/x-shellscript
Filename: collect-wait-events.sh
Type: application/x-shellscript
Part: 0
#!/bin/bash while /bin/true; do psql -t -A -c 'select extract(epoch from now()), wait_event_type, wait_event, count(*) from pg_stat_activity group by 1, 2, 3' test psql -t -A -c 'select pg_sleep(0.1)' test > /dev/null 2>&1 done