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 20191227221826.GA2547@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  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On 2019-Dec-27, Alvaro Herrera wrote:

> Working on getting your fix pushed now.

Ran out of time for today, but I added this test that reproduces the
issue -- fails without your patch, and works with it.

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.


(I wonder if a better solution for the master branch would involve a new
pg_trigger column that indicates the parent trigger for a cloned
trigger.  That would avoid pg_dump's new subquery.  Also: would it be
better to use pg_partition_ancestors instead of the sub-subquery?
...  though that doesn't work in pg11 ...)

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

Attachment

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: A row-level trigger on a partitioned table is not created on asub-partition created later
Next
From: Jeff Janes
Date:
Subject: Re: Indexing on JSONB field not working