class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool

def connection_active?

def connection_active?
  @connection.status == PG::CONNECTION_OK
rescue PG::Error
  false
end