diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index c39218f8db..828b9e47f7 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -2603,13 +2603,12 @@ CopyMultiInsertInfoCleanup(CopyMultiInsertInfo *miinfo) } /* - * Get the next TupleTableSlot that the next tuple should be stored in. + * Get the next free TupleTableSlot in rri's ri_CopyMultiInsertBuffer. * - * Callers must ensure that the buffer is not full. + * Callers must ensure that rri's ri_CopyMultiInsertBuffer is not full. */ static inline TupleTableSlot * -CopyMultiInsertInfoNextFreeSlot(CopyMultiInsertInfo *miinfo, - ResultRelInfo *rri) +CopyMultiInsertInfoNextFreeSlot(ResultRelInfo *rri) { CopyMultiInsertBuffer *buffer = rri->ri_CopyMultiInsertBuffer; int nused = buffer->nused; @@ -3022,8 +3021,7 @@ CopyFrom(CopyState cstate) Assert(resultRelInfo == target_resultRelInfo); Assert(insertMethod == CIM_MULTI); - myslot = CopyMultiInsertInfoNextFreeSlot(&multiInsertInfo, - resultRelInfo); + myslot = CopyMultiInsertInfoNextFreeSlot(resultRelInfo); } /* @@ -3170,8 +3168,7 @@ CopyFrom(CopyState cstate) /* no other path available for partitioned table */ Assert(insertMethod == CIM_MULTI_CONDITIONAL); - batchslot = CopyMultiInsertInfoNextFreeSlot(&multiInsertInfo, - resultRelInfo); + batchslot = CopyMultiInsertInfoNextFreeSlot(resultRelInfo); if (map != NULL) myslot = execute_attr_map_slot(map->attrMap, myslot,