diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-05-16 12:46:32 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-05-16 12:46:32 -0400 |
commit | 59f40566cab95181ec132b3f0208f34e4c67f2b0 (patch) | |
tree | 322161ace2c1b3ae6bdde4e22cad90ad2c02eed0 /src/backend/commands/trigger.c | |
parent | 8e709a612f4c10cdc4b19a734cd67ac019d0a2ec (diff) | |
download | postgresql-59f40566cab95181ec132b3f0208f34e4c67f2b0.tar.gz postgresql-59f40566cab95181ec132b3f0208f34e4c67f2b0.zip |
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
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r-- | src/backend/commands/trigger.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 819395a9678..1566fb46074 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -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); } |