pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix cloning of row triggers to sub-partitions 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix cloning of row triggers to sub-partitions @ 2020-01-02 20:11 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2020-01-02 20:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix cloning of row triggers to sub-partitions When row triggers exist in partitioned partitions that are not either part of FKs or deferred unique constraints, they are not correctly cloned to their partitions. That's because they are marked "internal", and those are purposefully skipped when doing the clone triggers dance. Fix by relaxing the condition on which internal triggers are skipped. Amit Langote initially diagnosed the problem and proposed a fix, but I used a different approach. Reported-by: Petr Fedorov Discussion: https://postgr.es/m/6b3f0646-ba8c-b3a9-c62d-1c6651a1920f@phystech.edu Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d732148398a6e406170383ab21960ac373cd1316 Modified Files -------------- src/backend/commands/tablecmds.c | 65 ++++++++++++++++++++++++++++++++-- src/test/regress/expected/triggers.out | 36 ++++++++++++------- src/test/regress/sql/triggers.sql | 4 +++ 3 files changed, 90 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix cloning of row triggers to sub-partitions @ 2020-01-02 20:11 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2020-01-02 20:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix cloning of row triggers to sub-partitions When row triggers exist in partitioned partitions that are not either part of FKs or deferred unique constraints, they are not correctly cloned to their partitions. That's because they are marked "internal", and those are purposefully skipped when doing the clone triggers dance. Fix by relaxing the condition on which internal triggers are skipped. Amit Langote initially diagnosed the problem and proposed a fix, but I used a different approach. Reported-by: Petr Fedorov Discussion: https://postgr.es/m/6b3f0646-ba8c-b3a9-c62d-1c6651a1920f@phystech.edu Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1fa846f1c9afe6bb185d4bb60bed8102a8eacb8f Modified Files -------------- src/backend/commands/tablecmds.c | 65 ++++++++++++++++++++++++++++++++-- src/test/regress/expected/triggers.out | 36 ++++++++++++------- src/test/regress/sql/triggers.sql | 4 +++ 3 files changed, 90 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix cloning of row triggers to sub-partitions @ 2020-01-02 20:11 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2020-01-02 20:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix cloning of row triggers to sub-partitions When row triggers exist in partitioned partitions that are not either part of FKs or deferred unique constraints, they are not correctly cloned to their partitions. That's because they are marked "internal", and those are purposefully skipped when doing the clone triggers dance. Fix by relaxing the condition on which internal triggers are skipped. Amit Langote initially diagnosed the problem and proposed a fix, but I used a different approach. Reported-by: Petr Fedorov Discussion: https://postgr.es/m/6b3f0646-ba8c-b3a9-c62d-1c6651a1920f@phystech.edu Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/adc9cb6f26f785d1e62a0bd86d69974aab1bf6e5 Modified Files -------------- src/backend/commands/tablecmds.c | 65 ++++++++++++++++++++++++++++++++-- src/test/regress/expected/triggers.out | 36 ++++++++++++------- src/test/regress/sql/triggers.sql | 4 +++ 3 files changed, 90 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-01-02 20:11 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-01-02 20:11 pgsql: Fix cloning of row triggers to sub-partitions Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-01-02 20:11 pgsql: Fix cloning of row triggers to sub-partitions Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-01-02 20:11 pgsql: Fix cloning of row triggers to sub-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