Re: A row-level trigger on a partitioned table is not created on asub-partition created later - Mailing list pgsql-bugs

From Amit Langote
Subject Re: A row-level trigger on a partitioned table is not created on asub-partition created later
Date
Msg-id CA+HiwqE+7E1AOG+sN3KXwYTaJMU2J+k7v6mn+NJNfZhjZp9r5Q@mail.gmail.com
Whole thread Raw
In response to Re: A row-level trigger on a partitioned table is not created on asub-partition created later  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: A row-level trigger on a partitioned table is not created on asub-partition created later  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Wed, Dec 18, 2019 at 6:56 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> On 2019-Dec-18, Amit Langote wrote:
> > Alvaro, isn't marking triggers cloned to partitions "internal"
> > unnecessary?  Because the cloned trigger on partition (level2 in above
> > example) is marked internal, CloneRowTriggersToPartition() skips it
> > when called on a sub-partition (level3 in above example).
> >
> > Attached patch to fix that passes make check, although a bit surprised
> > that it does.
>
> IIRC that change would break pg_dump.

Indeed it does, but looks like partition triggers are not tested that
extensively in pg_dump's suite.

Attached updated patch with pg_dump hacks seems to do the trick for
me.  What do you think?

Thanks,
Amit

Attachment

pgsql-bugs by date:

Previous
From: tao jin
Date:
Subject: ERROR,XX000,"cache lookup failed for type 0"
Next
From: Zhihong Zhang
Date:
Subject: Re: Indexing on JSONB field not working