From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Petr Fedorov <petr.fedorov@phystech.edu>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: A row-level trigger on a partitioned table is not created on a sub-partition created later
Date: Tue, 31 Dec 2019 16:47:59 -0300
Message-ID: <20191231194759.GA24692@alvherre.pgsql> (raw)
In-Reply-To: <20191227221826.GA2547@alvherre.pgsql>
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
Attachments:
0001-Add-failed-test-that-shows-the-issue.patch (text/x-diff, 0B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, amitlangote09@gmail.com, petr.fedorov@phystech.edu
Subject: Re: A row-level trigger on a partitioned table is not created on a sub-partition created later
In-Reply-To: <20191231194759.GA24692@alvherre.pgsql>
References: <20191227221826.GA2547@alvherre.pgsql> <20191231194759.GA24692@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox