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