diff --git a/src/backend/distributed/connection/remote_commands.c b/src/backend/distributed/connection/remote_commands.c index 8999ace4f..2f6ef9de6 100644 --- a/src/backend/distributed/connection/remote_commands.c +++ b/src/backend/distributed/connection/remote_commands.c @@ -65,24 +65,7 @@ IsResponseOK(PGresult *result) void ForgetResults(MultiConnection *connection) { - while (true) - { - PGresult *result = NULL; - const bool dontRaiseErrors = false; - - result = GetRemoteCommandResult(connection, dontRaiseErrors); - if (result == NULL) - { - break; - } - if (PQresultStatus(result) == PGRES_COPY_IN) - { - PQputCopyEnd(connection->pgConn, NULL); - - /* TODO: mark transaction as failed, once we can. */ - } - PQclear(result); - } + ClearResults(connection, false); }