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

2017-05-16 Thread Robert Haas
On Mon, May 15, 2017 at 9:17 PM, Amit Langote wrote: >> Ok, here's a patch like that. > > Thanks, looks good to me. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

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

2017-05-15 Thread Amit Langote
On 2017/05/16 10:03, Thomas Munro wrote: > On Tue, May 16, 2017 at 12:32 PM, Amit Langote > wrote: >> I vote for ExecCleanupTriggerState(estate). After your patch, there will >> be 4 places, including afterTriggerInvokeEvents(), ExecEndPlan(), and >>

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

2017-05-15 Thread Thomas Munro
On Tue, May 16, 2017 at 12:32 PM, Amit Langote 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,

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

2017-05-15 Thread Amit Langote
Hi Thomas, On 2017/05/16 9:12, Thomas Munro wrote: > Hi hackers, > > While testing the patch I'm writing for the transition table open > item, I noticed that we can leak Relation objects like this: > > postgres=# create table parent (a text, b int) partition by list (a); > CREATE TABLE >

[HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-15 Thread Thomas Munro
Hi hackers, While testing the patch I'm writing for the transition table open item, I noticed that we can leak Relation objects like this: postgres=# create table parent (a text, b int) partition by list (a); CREATE TABLE postgres=# create table child partition of parent for values in ('AAA');