pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Preserve firing-on state when cloning row triggers to partitions
5+ messages / 1 participants
[nested] [flat]

* pgsql: Preserve firing-on state when cloning row triggers to partitions
@ 2021-07-16 17:03  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2021-07-16 17:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.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(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Preserve firing-on state when cloning row triggers to partitions
@ 2021-07-16 17:03  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2021-07-16 17:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/eef92de11e50837e4a0d02fc7269fdba7c97e583

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(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Preserve firing-on state when cloning row triggers to partitions
@ 2021-07-16 17:03  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2021-07-16 17:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7584ec1f60980ee855aa34d8159f7f9cddc289af

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(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Preserve firing-on state when cloning row triggers to partitions
@ 2021-07-16 17:03  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2021-07-16 17:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c31516ae5b43d8a1a99e8e43abc84d791ce15ef1

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(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Preserve firing-on state when cloning row triggers to partitions
@ 2021-07-16 17:03  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2021-07-16 17:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/df80fa2ee50478391445cef03e42c1b3d64fccca

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(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-07-16 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 17:03 pgsql: Preserve firing-on state when cloning row triggers to partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 17:03 pgsql: Preserve firing-on state when cloning row triggers to partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 17:03 pgsql: Preserve firing-on state when cloning row triggers to partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 17:03 pgsql: Preserve firing-on state when cloning row triggers to partitions Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 17:03 pgsql: Preserve firing-on state when cloning row triggers to partitions Alvaro Herrera <alvherre@alvh.no-ip.org>

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