diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5eee0c1..638ed2062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ argument or resolve the type ambiguity by casting to the intended type. * #4685 Improve chunk exclusion for space dimensions * #4696 Report warning when enabling compression on hypertable * #4720 Fix chunk exclusion for prepared statements and dst changes +* #4738 Fix the assorted epoll_ctl() errors that could occur with COPY into a distributed hypertable * #4739 Fix continuous aggregate migrate check constraint **Thanks** diff --git a/tsl/src/remote/connection.c b/tsl/src/remote/connection.c index 025b2f98f..a3bb1dec7 100644 --- a/tsl/src/remote/connection.c +++ b/tsl/src/remote/connection.c @@ -2278,8 +2278,8 @@ remote_connection_end_copy(TSConnection *conn, TSConnectionError *err) * writeable, we just retry. */ (void) WaitLatchOrSocket(MyLatch, + WL_TIMEOUT | WL_SOCKET_WRITEABLE | WL_EXIT_ON_PM_DEATH, socket, - WL_TIMEOUT | WL_SOCKET_WRITEABLE, /* timeout = */ 1000, /* wait_event_info = */ 0); } @@ -2348,12 +2348,8 @@ remote_connection_end_copy(TSConnection *conn, TSConnectionError *err) ExecStatusType status = PQresultStatus(res); if (status != PGRES_COMMAND_OK) { - success = - fill_result_error(err, - ERRCODE_CONNECTION_EXCEPTION, - psprintf("invalid result status '%s' when ending remote COPY", - PQresStatus(status)), - res); + success = false; + remote_connection_get_result_error(res, err); } }