mirror of
https://github.com/postgres/postgres.git
synced 2026-07-15 20:52:53 -04:00
Fix memory leak when inserting tuple at relation creation for CTAS
The leak has been introduced by 763f2ed 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
This commit is contained in:
parent
ff11e7f4b9
commit
414a9d3cf3
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue