server side part of `heroku pg:diagnose`