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

From Alvaro Herrera
Subject Re: A row-level trigger on a partitioned table is not created on asub-partition created later
Date
Msg-id 20191231194759.GA24692@alvherre.pgsql
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
List pgsql-bugs
On 2019-Dec-27, Alvaro Herrera wrote:

> One thing I just realized is that in next minors' release notes we
> should publish a recipe to fix catalogs for existing databases, unless
> we go for a fix that doesn't require changing the catalogs -- I don't
> know what that would be, though, but maybe it would not be totally
> insane to clone even internal triggers in the cases that matter.

So, the more I thought about this, the more it seemed that marking those
triggers as not internal was the wrong thing to do.  So I instead made
it clone the internal triggers that seem to matter.  This fixes the
originally reported problem, and passes the test case I propose.  Also,
pg_dump continues to work unchanged, and existing database don't need
tweaking (excepting those that might already be missing triggers).

It would be better to fix master afterwards, by adding a
pg_trigger.trgparentid column, which seems like it would be a better
answer going forward.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-bugs by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: pg_upgrade
Next
From: Sandeep Thakkar
Date:
Subject: Re: PostgreSQL Installation Error