mirror of https://github.com/citusdata/citus.git
Cancel statements when closing connection at transaction end.
That's important because the currently running statement on a worker might continue to hold locks and consume resources, even after the connection is closed. Unfortunately postgres will only notice closed connections when reading from / writing to the network. That might only happen much later.pull/1650/head
parent
25cabe634e
commit
992f2d907d
|
@ -720,8 +720,7 @@ AfterXactHostConnectionHandling(ConnectionHashEntry *entry, bool isCommit)
|
|||
PQstatus(connection->pgConn) != CONNECTION_OK ||
|
||||
PQtransactionStatus(connection->pgConn) != PQTRANS_IDLE)
|
||||
{
|
||||
PQfinish(connection->pgConn);
|
||||
connection->pgConn = NULL;
|
||||
ShutdownConnection(connection);
|
||||
|
||||
/* unlink from list */
|
||||
dlist_delete(iter.cur);
|
||||
|
|
Loading…
Reference in New Issue