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

Commit3a45321

Browse files
author
Etsuro Fujita
committed
Fix thinko in ExecCleanupTupleRouting().
Commit3f2393e changed ExecCleanupTupleRouting() so that it skippedcleaning up subplan resultrels before calling EndForeignInsert(), butthat would cause an issue: when those resultrels were foreign tables,the FDWs would fail to shut down. Repair by skipping it after callingEndForeignInsert() as before.Author: Etsuro FujitaReviewed-by: David Rowley and Amit LangoteDiscussion:https://postgr.es/m/5CAF3B8F.2090905@lab.ntt.co.jp
1 parentabb9c63 commit3a45321

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/backend/executor/execPartition.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,12 @@ ExecCleanupTupleRouting(ModifyTableState *mtstate,
11261126
{
11271127
ResultRelInfo*resultRelInfo=proute->partitions[i];
11281128

1129+
/* Allow any FDWs to shut down */
1130+
if (resultRelInfo->ri_FdwRoutine!=NULL&&
1131+
resultRelInfo->ri_FdwRoutine->EndForeignInsert!=NULL)
1132+
resultRelInfo->ri_FdwRoutine->EndForeignInsert(mtstate->ps.state,
1133+
resultRelInfo);
1134+
11291135
/*
11301136
* Check if this result rel is one belonging to the node's subplans,
11311137
* if so, let ExecEndPlan() clean it up.
@@ -1142,12 +1148,6 @@ ExecCleanupTupleRouting(ModifyTableState *mtstate,
11421148
continue;
11431149
}
11441150

1145-
/* Allow any FDWs to shut down if they've been exercised */
1146-
if (resultRelInfo->ri_FdwRoutine!=NULL&&
1147-
resultRelInfo->ri_FdwRoutine->EndForeignInsert!=NULL)
1148-
resultRelInfo->ri_FdwRoutine->EndForeignInsert(mtstate->ps.state,
1149-
resultRelInfo);
1150-
11511151
ExecCloseIndices(resultRelInfo);
11521152
table_close(resultRelInfo->ri_RelationDesc,NoLock);
11531153
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp