mirror of https://github.com/citusdata/citus.git
on shutdown, consume any response before sending shutdown packet
parent
8aca59fa32
commit
e06cf9a822
|
@ -616,7 +616,17 @@ ShutdownConnection(MultiConnection *connection)
|
||||||
if (PQstatus(connection->pgConn) == CONNECTION_OK &&
|
if (PQstatus(connection->pgConn) == CONNECTION_OK &&
|
||||||
PQtransactionStatus(connection->pgConn) == PQTRANS_ACTIVE)
|
PQtransactionStatus(connection->pgConn) == PQTRANS_ACTIVE)
|
||||||
{
|
{
|
||||||
SendCancelationRequest(connection);
|
bool sentCancel = SendCancelationRequest(connection);
|
||||||
|
if (sentCancel)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* If we have sent a cancelation we need to wait and consume the response to
|
||||||
|
* make sure the cancelation is processed. In case of network delay
|
||||||
|
* cancelation might hit other backend/query. Poolers might introduce out of
|
||||||
|
* order delivery.
|
||||||
|
*/
|
||||||
|
ClearResultsDiscardWarnings(connection, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CitusPQFinish(connection);
|
CitusPQFinish(connection);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue