Commit 414a9d3c authored by Michael Paquier's avatar Michael Paquier

Fix memory leak when inserting tuple at relation creation for CTAS

The leak has been introduced by 763f2edd which has addressed the problem
for transient tables, and forgot CREATE TABLE AS which shares a similar
logic when receiving a new tuple to store into the newly-created
relation.

Author: Jeff Janes
Discussion: https://postgr.es/m/CAMkU=1xZXtz3mziPEPD2Fubbas4G2RWkZm5HHABtfKVcbu1=Sg@mail.gmail.com
parent ff11e7f4
......@@ -587,6 +587,9 @@ intorel_receive(TupleTableSlot *slot, DestReceiver *self)
/* We know this is a newly created relation, so there are no indexes */
/* Free the copied tuple. */
heap_freetuple(tuple);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment