mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 01:53:41 +08:00
Fix error when waiting for remote COPY to finish
Pass proper flags to WaitLatchOrSocket, and fix the swapped up arguments.
This commit is contained in:
parent
9d0d159ac1
commit
6011c1446e
@ -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**
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user