diff options
Diffstat (limited to 'src/backend/commands/matview.c')
-rw-r--r-- | src/backend/commands/matview.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index e1eb7c374b8..9957c7074de 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -484,7 +484,7 @@ transientrel_receive(TupleTableSlot *slot, DestReceiver *self) * get the heap tuple out of the tuple table slot, making sure we have a * writable copy */ - tuple = ExecMaterializeSlot(slot); + tuple = ExecCopySlotTuple(slot); heap_insert(myState->transientrel, tuple, @@ -494,6 +494,9 @@ transientrel_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; } |