never_executed_fix.patch
text/x-patch
Filename: never_executed_fix.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| contrib/postgres_fdw/postgres_fdw.c | 7 | 2 |
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index e201b5404e..a960ada441 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -6857,8 +6857,13 @@ produce_tuple_asynchronously(AsyncRequest *areq, bool fetch)
}
else
{
- /* There's nothing more to do; just return a NULL pointer */
- result = NULL;
+ /*
+ * There's nothing more to do; just check it and get an empty slot
+ * from the child node.
+ */
+ result = ExecProcNode((PlanState *) node);
+ Assert(TupIsNull(result));
+
/* Mark the request as complete */
ExecAsyncRequestDone(areq, result);
}