diff --git a/src/backend/distributed/connection/remote_commands.c b/src/backend/distributed/connection/remote_commands.c index 89af02224..0e90c24f6 100644 --- a/src/backend/distributed/connection/remote_commands.c +++ b/src/backend/distributed/connection/remote_commands.c @@ -606,14 +606,14 @@ PutRemoteCopyData(MultiConnection *connection, const char *buffer, int nbytes) Assert(PQisnonblocking(pgConn)); int copyState = PQputCopyData(pgConn, buffer, nbytes); - if (copyState == -1) + if (copyState <= 0) { return false; } /* * PQputCopyData may have queued up part of the data even if it managed - * to send some of it succesfully. We provide back pressure by waiting + * to send some of it successfully. We provide back pressure by waiting * until the socket is writable to prevent the internal libpq buffers * from growing excessively. *