diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index c0a4e72d4bc..fc132759377 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -3301,19 +3301,6 @@ clean_up_IVM_hash_entry(MV_TriggerHashEntry *entry, bool is_abort) list_free(table->new_tuplestores); table->new_tuplestores = NIL; } - if (!is_abort) - { - if (table->slot) - { - ExecDropSingleTupleTableSlot(table->slot); - table->slot = NULL; - } - if (table->rel) - { - table_close(table->rel, NoLock); - table->rel = NULL; - } - } } if (entry->tables) @@ -3482,6 +3469,7 @@ AddPreassignedMVEntry(Oid matview_id, Oid table_id, const char* snapname) entry->has_new = false; entry->pid = MyProcPid; entry->snapshot = NULL; + entry->snapname = NULL; } /* Switch to the new resource owner and memory context */