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

Commit76cbfcd

Browse files
committed
Always call ExecShutdownNode() if appropriate.
Call ExecShutdownNode() after ExecutePlan()'s loop, rather than at eachbreak. We had forgotten to do that in one case. The omission causedintermittent "temporary file leak" warnings from multi-batch parallelhash joins with a LIMIT clause.Back-patch to 11. Though the problem exists in theory in earlierparallel query releases, nothing really depended on it.Author: Kyotaro HoriguchiReviewed-by: Thomas Munro, Amit KapilaDiscussion:https://postgr.es/m/20191111.212418.2222262873417235945.horikyota.ntt%40gmail.com
1 parent6ae4d27 commit76cbfcd

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

‎src/backend/executor/execMain.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,15 +1650,7 @@ ExecutePlan(EState *estate,
16501650
* process so we just end the loop...
16511651
*/
16521652
if (TupIsNull(slot))
1653-
{
1654-
/*
1655-
* If we know we won't need to back up, we can release resources
1656-
* at this point.
1657-
*/
1658-
if (!(estate->es_top_eflags&EXEC_FLAG_BACKWARD))
1659-
(void)ExecShutdownNode(planstate);
16601653
break;
1661-
}
16621654

16631655
/*
16641656
* If we have a junk filter, then project a new tuple with the junk
@@ -1701,17 +1693,16 @@ ExecutePlan(EState *estate,
17011693
*/
17021694
current_tuple_count++;
17031695
if (numberTuples&&numberTuples==current_tuple_count)
1704-
{
1705-
/*
1706-
* If we know we won't need to back up, we can release resources
1707-
* at this point.
1708-
*/
1709-
if (!(estate->es_top_eflags&EXEC_FLAG_BACKWARD))
1710-
(void)ExecShutdownNode(planstate);
17111696
break;
1712-
}
17131697
}
17141698

1699+
/*
1700+
* If we know we won't need to back up, we can release resources at this
1701+
* point.
1702+
*/
1703+
if (!(estate->es_top_eflags&EXEC_FLAG_BACKWARD))
1704+
(void)ExecShutdownNode(planstate);
1705+
17151706
if (use_parallel_mode)
17161707
ExitParallelMode();
17171708
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp