Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c878a7

Browse files
committed
Avoid server crash when worker registration fails at execution time.
The previous coding attempts to destroy the DSM in this case, butchild nodes might have stored data there and still be holding ontopointers 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 parent74d0d5f commit6c878a7

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)

[8]ページ先頭

©2009-2025 Movatter.jp