Free per-tuple COPY memory in INSERT...SELECT

pull/1643/head
Marco Slot 2017-09-12 09:51:42 -07:00
parent b0df3a6746
commit cbe16169b4
1 changed files with 8 additions and 0 deletions

View File

@ -2010,6 +2010,14 @@ CitusCopyDestReceiverReceive(TupleTableSlot *slot, DestReceiver *dest)
copyDest->tuplesSent++;
/*
* Release per tuple memory allocated in this function. If we're writing
* the results of an INSERT ... SELECT then the SELECT execution will use
* its own executor state and reset the per tuple expression context
* separately.
*/
ResetPerTupleExprContext(executorState);
return true;
}