Re: pg_trigger.tgparentid

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_trigger.tgparentid
Date: 2020-02-18 04:11:06
Message-ID: CA+HiwqE17VLba2c7VTx8tb70DkDq0go_tF7tusXJk=1kgp6E=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 18, 2020 at 6:56 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> As mentioned in https://postgr.es/m/20191231194759.GA24692@alvherre.pgsql
> I propose to add a new column to pg_trigger, which allows us to remove a
> pg_depend scan when cloning triggers when adding/attaching partitions.
> (It's not that I think the scan is a performance problem, but rather
> than notionally we try not to depend on pg_depend contents for this kind
> of semantic derivation.)

@@ -16541,7 +16493,7 @@ CloneRowTriggersToPartition(Relation parent,
Relation partition)
*
* However, if our parent is a partitioned relation, there might be

This is existing text, but should really be:

However, if our parent is a *partition* itself, there might be

(Sorry, I forgot to report this when the bug-fix went in couple months ago.)

* internal triggers that need cloning. In that case, we must skip
- * clone it if the trigger on parent depends on another trigger.
+ * cloning it if the trigger on parent depends on another trigger.

2nd sentence seems unclear to me. Does the following say what needs
to be said here:

* However, if our parent is a partition itself, there might be
* internal triggers that need cloning. For example, triggers on the
* parent that were in turn cloned from its own parent are marked
* internal, which too must be cloned to the partition.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-02-18 04:16:56 Re: table partitioning and access privileges
Previous Message Michael Paquier 2020-02-18 03:39:49 Re: Wait event that should be reported while waiting for WAL archiving to finish