Fix PG::ConnectionBad leaking to ActiveRecord