Re: Relcache leak when row triggers on partitions are fired by COPY

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Relcache leak when row triggers on partitions are fired by COPY
Date: 2017-05-16 01:03:19
Message-ID: CAEepm=3Za+CVmkxzh0pZCxbTNZtPq=vDWGFVoX82-fEppb8hGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 16, 2017 at 12:32 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> I vote for ExecCleanupTriggerState(estate). After your patch, there will
> be 4 places, including afterTriggerInvokeEvents(), ExecEndPlan(), and
> EvalPlanQualEnd(), that repeat the same block of code.

Ok, here's a patch like that. The call to ExecCloseIndices() may
technically be redundant (we never opened them).

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
fix-relcache-leak-in-copy-with-triggers-v2.patch application/octet-stream 5.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2017-05-16 01:05:45 Re: Server Crashes if try to provide slot_name='none' at the time of creating subscription.
Previous Message Amit Langote 2017-05-16 00:32:49 Re: Relcache leak when row triggers on partitions are fired by COPY