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

Commitacf555b

Browse files
committed
Shut down Gather's children before shutting down Gather itself.
It turns out that the original shutdown order here does not work well.Multiple people attempting to develop further parallel query patcheshave discovered that they need to do cleanup before the DSM goes away,and you can't do that if the parent node gets cleaned up first.Patch by me, reviewed by KaiGai Kohei and Dilip Kumar.Discussion:http://postgr.es/m/CA+TgmoY6bOc1YnhcAQnMfCBDbsJzROQ3sYxSAL-SYB5tMJcTKg@mail.gmail.comDiscussion:http://postgr.es/m/9A28C8860F777E439AA12E8AEA7694F8012AEB82@BPXM15GP.gisp.nec.co.jpDiscussion:http://postgr.es/m/CA+TgmoYuPOc=+xrG1v0fCsoLbKAab9F1ddOeaaiLMzKOiBar1Q@mail.gmail.com
1 parentd912dd0 commitacf555b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/backend/executor/execProcnode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,8 @@ ExecShutdownNode(PlanState *node)
815815
if (node==NULL)
816816
return false;
817817

818+
planstate_tree_walker(node,ExecShutdownNode,NULL);
819+
818820
switch (nodeTag(node))
819821
{
820822
caseT_GatherState:
@@ -824,5 +826,5 @@ ExecShutdownNode(PlanState *node)
824826
break;
825827
}
826828

827-
returnplanstate_tree_walker(node,ExecShutdownNode,NULL);
829+
returnfalse;
828830
}

‎src/backend/executor/nodeGather.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ ExecGather(GatherState *node)
229229
void
230230
ExecEndGather(GatherState*node)
231231
{
232+
ExecEndNode(outerPlanState(node));/* let children clean up first */
232233
ExecShutdownGather(node);
233234
ExecFreeExprContext(&node->ps);
234235
ExecClearTuple(node->ps.ps_ResultTupleSlot);
235-
ExecEndNode(outerPlanState(node));
236236
}
237237

238238
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp