mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fix relcache leak when row triggers on partitions are fired by COPY.
Thomas Munro, reviewed by Amit Langote Discussion: http://postgr.es/m/CAEepm=15Jss-yhFApuKzxcoCuFnb8TR8iQiWMjG=CLYPx48QLw@mail.gmail.com
This commit is contained in:
@ -4110,16 +4110,7 @@ afterTriggerInvokeEvents(AfterTriggerEventList *events,
|
||||
|
||||
if (local_estate)
|
||||
{
|
||||
ListCell *l;
|
||||
|
||||
foreach(l, estate->es_trig_target_relations)
|
||||
{
|
||||
ResultRelInfo *resultRelInfo = (ResultRelInfo *) lfirst(l);
|
||||
|
||||
/* Close indices and then the relation itself */
|
||||
ExecCloseIndices(resultRelInfo);
|
||||
heap_close(resultRelInfo->ri_RelationDesc, NoLock);
|
||||
}
|
||||
ExecCleanUpTriggerState(estate);
|
||||
FreeExecutorState(estate);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user