Skip to content

Commit a1115fa

Browse files
committed
Postpone some more stuff out of ExecInitModifyTable.
Delay creation of the projections for INSERT and UPDATE tuples until they're needed. This saves a pretty fair amount of work when only some of the partitions are actually touched. The logic associated with identifying junk columns in UPDATE/DELETE is moved to another loop, allowing removal of one loop over the target relations; but it didn't actually change at all. Extracted from a larger patch, which seemed to me to be too messy to push in one commit. Amit Langote, reviewed at different times by Heikki Linnakangas and myself Discussion: https://postgr.es/m/CA+HiwqG7ZruBmmih3wPsBZ4s0H2EhywrnXEduckY5Hr3fWzPWA@mail.gmail.com
1 parent 3b82d99 commit a1115fa

File tree

3 files changed

+210
-158
lines changed

3 files changed

+210
-158
lines changed

src/backend/executor/execMain.c

+1
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,7 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo,
12211221
resultRelInfo->ri_projectNew = NULL;
12221222
resultRelInfo->ri_newTupleSlot = NULL;
12231223
resultRelInfo->ri_oldTupleSlot = NULL;
1224+
resultRelInfo->ri_projectNewInfoValid = false;
12241225
resultRelInfo->ri_FdwState = NULL;
12251226
resultRelInfo->ri_usesFdwDirectModify = false;
12261227
resultRelInfo->ri_ConstraintExprs = NULL;

0 commit comments

Comments
 (0)