summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/pgxc/pool/execRemote.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c
index 9d70d9f8e2..9deb7b0c0c 100644
--- a/src/backend/pgxc/pool/execRemote.c
+++ b/src/backend/pgxc/pool/execRemote.c
@@ -3801,6 +3801,13 @@ ExecEndRemoteQuery(RemoteQueryState *node)
pfree(node->currentRow.msg);
node->currentRow.msg = NULL;
}
+
+ if (conn == NULL)
+ {
+ node->conn_count--;
+ continue;
+ }
+
/* no data is expected */
if (conn->state == DN_CONNECTION_STATE_IDLE ||
conn->state == DN_CONNECTION_STATE_ERROR_FATAL)