Merge pull request #1643 from citusdata/fix_insert_select_memory

Free per-tuple COPY memory in INSERT...SELECT via coordinator
pull/1648/head
Marco Slot 2017-09-12 15:49:04 -07:00 committed by GitHub
commit f5361d52e7
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;
}