diff --git a/src/backend/distributed/executor/multi_client_executor.c b/src/backend/distributed/executor/multi_client_executor.c index cbc2fd572..e33d3a3e1 100644 --- a/src/backend/distributed/executor/multi_client_executor.c +++ b/src/backend/distributed/executor/multi_client_executor.c @@ -397,7 +397,7 @@ MultiClientSendQuery(int32 connectionId, const char *query) connection = ClientConnectionArray[connectionId]; Assert(connection != NULL); - querySent = PQsendQuery(connection->pgConn, query); + querySent = SendRemoteCommand(connection, query); if (querySent == 0) { char *errorMessage = pchomp(PQerrorMessage(connection->pgConn)); diff --git a/src/backend/distributed/master/master_citus_tools.c b/src/backend/distributed/master/master_citus_tools.c index bc491fe54..f04cae685 100644 --- a/src/backend/distributed/master/master_citus_tools.c +++ b/src/backend/distributed/master/master_citus_tools.c @@ -271,12 +271,7 @@ ExecuteCommandsInParallelAndStoreResults(StringInfo *nodeNameArray, int *nodePor continue; } - /* - * NB: this intentionally uses PQsendQuery rather than - * SendRemoteCommand as multiple commands are allowed. - */ - querySent = PQsendQuery(connection->pgConn, queryString); - + querySent = SendRemoteCommand(connection, queryString); if (querySent == 0) { StoreErrorMessage(connection, queryResultString);