Re: A row-level trigger on a partitioned table is not created on a sub-partition created later

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Petr Fedorov <petr(dot)fedorov(at)phystech(dot)edu>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: A row-level trigger on a partitioned table is not created on a sub-partition created later
Date: 2019-12-26 08:00:34
Message-ID: CA+HiwqE+7E1AOG+sN3KXwYTaJMU2J+k7v6mn+NJNfZhjZp9r5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 18, 2019 at 6:56 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)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 Content-Type Size
dont-mark-cloned-triggers-internal_v2.patch text/plain 6.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-12-26 13:53:29 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema
Previous Message tao jin 2019-12-26 05:58:32 ERROR,XX000,"cache lookup failed for type 0"