class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool

def dealloc(key)

def dealloc(key)
  # This is ugly, but safe: the statement pool is only
  # accessed while holding the connection's lock. (And we
  # don't need the complication of with_raw_connection because
  # a reconnect would invalidate the entire statement pool.)
  if conn = @connection.instance_variable_get(:@raw_connection)
    conn.query "DEALLOCATE #{key}" if conn.status == PG::CONNECTION_OK
  end
rescue PG::Error
end