From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Preserve firing-on state when cloning row triggers to partitions |
Date: | 2021-07-16 17:03:15 |
Message-ID: | E1m4RF5-0007iu-8u@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Preserve firing-on state when cloning row triggers to partitions
When triggers are cloned from partitioned tables to their partitions,
the 'tgenabled' flag (origin/replica/always/disable) was not propagated.
Make it so that the flag on the trigger on partition is initially set to
the same value as on the partitioned table.
Add a test case to verify the behavior.
Backpatch to 11, where this appeared in commit 86f575948c77.
Author: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Reported-by: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/fed35bd4a65032f714af6bc88c102d0e90422dee
Modified Files
--------------
src/backend/commands/tablecmds.c | 8 ++---
src/backend/commands/trigger.c | 30 ++++++++++++++----
src/include/commands/trigger.h | 5 +++
src/test/regress/expected/triggers.out | 56 ++++++++++++++++++++++++++++++++++
src/test/regress/sql/triggers.sql | 32 +++++++++++++++++++
5 files changed, 121 insertions(+), 10 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2021-07-16 21:50:30 | pgsql: Fix pg_dump for disabled triggers on partitioned tables |
Previous Message | Alvaro Herrera | 2021-07-16 16:10:48 | pgsql: Advance old-segment horizon properly after slot invalidation |