Content-Length: 273824 | pFad | http://github.com/postgrespro/postgres_cluster/commit/6c878a7553680579f287e4659592c0b874fb2377

F6 Avoid server crash when worker registration fails at execution time. · postgrespro/postgres_cluster@6c878a7 · GitHub
Skip to content

Commit 6c878a7

Browse files
committed
Avoid server crash when worker registration fails at execution time.
The previous coding attempts to destroy the DSM in this case, but child nodes might have stored data there and still be holding onto pointers in this case. So don't do that. Also, free the reader array instead of leaking it. Extracted from two different patch versions both by Amit Kapila.
1 parent 74d0d5f commit 6c878a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/executor/nodeGather.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ ExecGather(GatherState *node)
190190

191191
/* No workers? Then never mind. */
192192
if (!got_any_worker)
193-
ExecShutdownGather(node);
193+
ExecShutdownGatherWorkers(node);
194194
}
195195

196196
/* Run plan locally if no workers or not single-copy. */
@@ -402,6 +402,8 @@ ExecShutdownGatherWorkers(GatherState *node)
402402

403403
for (i = 0; i < node->nreaders; ++i)
404404
DestroyTupleQueueReader(node->reader[i]);
405+
406+
pfree(node->reader);
405407
node->reader = NULL;
406408
}
407409

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/6c878a7553680579f287e4659592c0b874fb2377

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy