From 11ff4a1faf3e2620622687007b372e3b1cdf572a Mon Sep 17 00:00:00 2001 From: Onder Kalaci Date: Fri, 18 Nov 2022 16:48:19 +0100 Subject: [PATCH] w --- src/backend/distributed/executor/adaptive_executor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/executor/adaptive_executor.c b/src/backend/distributed/executor/adaptive_executor.c index 419b41d82..b55ef4814 100644 --- a/src/backend/distributed/executor/adaptive_executor.c +++ b/src/backend/distributed/executor/adaptive_executor.c @@ -666,7 +666,6 @@ static WorkerPool * FindOrCreateWorkerPool(DistributedExecution *execution, char *nodeName, int nodePort); static WorkerSession * FindOrCreateWorkerSession(WorkerPool *workerPool, MultiConnection *connection); -static bool RemoteSocketClosedForNewSession(WorkerSession *session); static void ManageWorkerPool(WorkerPool *workerPool); static bool ShouldWaitForSlowStart(WorkerPool *workerPool); static int CalculateNewConnectionCount(WorkerPool *workerPool); @@ -5489,6 +5488,8 @@ BuildWaitEventSet(List *sessionList, bool socketClosedOnly) CitusAddWaitEventSetToSet(waitEventSet, WL_POSTMASTER_DEATH, PGINVALID_SOCKET, NULL, NULL); + + if (!socketClosedOnly) CitusAddWaitEventSetToSet(waitEventSet, WL_LATCH_SET, PGINVALID_SOCKET, MyLatch, NULL);