From 4e3d633ebf87955492524082060f1b7b32e33b40 Mon Sep 17 00:00:00 2001 From: Murat Tuncer Date: Tue, 7 Nov 2017 12:33:25 +0200 Subject: [PATCH] Add check for connection failures during multishard update (#1765) --- src/backend/distributed/executor/multi_router_executor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/distributed/executor/multi_router_executor.c b/src/backend/distributed/executor/multi_router_executor.c index 8aeae4648..4acda6ff8 100644 --- a/src/backend/distributed/executor/multi_router_executor.c +++ b/src/backend/distributed/executor/multi_router_executor.c @@ -1141,8 +1141,11 @@ ExecuteModifyTasks(List *taskList, bool expectResults, ParamListInfo paramListIn ¤tAffectedTupleCount); } - /* should have rolled back on error */ - Assert(queryOK); + /* We error out if the worker fails to return a result for the query. */ + if (!queryOK) + { + ReportConnectionError(connection, ERROR); + } if (placementIndex == 0) {