Re: Rename of triggers for partitioned tables

Zhihong Yu <zyu@yugabyte.com>

From: Zhihong Yu <zyu@yugabyte.com>
To: Arne Roland <A.Roland@index.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-26T18:32:38Z
Lists: pgsql-hackers
On Sat, Jun 26, 2021 at 10:08 AM Arne Roland <A.Roland@index.de> wrote:

> *From:* Alvaro Herrera <alvherre@alvh.no-ip.org>
> *Sent:* Saturday, June 26, 2021 18:36
> *Subject:* Re: Rename of triggers for partitioned tables
>
> > I'll have a look during the commitfest which starts late next week.
>
> Thank you!
>
> > (However, I'm fairly sure that it won't be in released versions ...
> > it'll only be fixed in the version to be released next year, postgres
> > 15.  Things that are clear bug fixes can be applied
> > in released versions, but this patch probably changes behavior in ways
> > that are not acceptable in released versions.  Sorry about that.)
>
> I never expected any backports. Albeit I don't know anyone, who would
> mind, I agree with you on that assessment. This is very annoying, but not
> really breaking the product.
>
> Sure, I was hoping for pg14 initially. But I will survive another year of
> gexec.
> I am grateful you agreed to have a look!
>
> Regards
> Arne
>
> Hi, Arne:
It seems the patch no longer applies cleanly on master branch.
Do you mind updating the patch ?

Thanks

1 out of 7 hunks FAILED -- saving rejects to file
src/backend/commands/trigger.c.rej
patching file src/backend/parser/gram.y
Hunk #1 succeeded at 8886 (offset 35 lines).
patching file src/backend/utils/adt/ri_triggers.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
src/backend/utils/adt/ri_triggers.c.rej

Commits

  1. Remove newly added useless assertion check

  2. Make ALTER TRIGGER RENAME consistent for partitioned tables

  3. Fix pg_dump for disabled triggers on partitioned tables

  4. Preserve firing-on state when cloning row triggers to partitions

  5. Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

  6. Record parents of triggers

  7. Allow FOR EACH ROW triggers on partitioned tables