pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion @ 2020-10-20 22:23 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-10-20 22:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy inheritance has never recursed in that situation, make sure to do that only for new-style partitioning. I noticed this problem while testing a fix for another bug in the vicinity. This has been wrong all along, so backpatch to 11. Discussion: https://postgr.es/m/20201016235925.GA29829@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/bbb927b4db9b3b449ccd0f76c1296de382a2f0c1 Modified Files -------------- src/backend/commands/tablecmds.c | 2 ++ src/backend/commands/trigger.c | 21 ------------- src/test/regress/expected/triggers.out | 56 ++++++++++++++++++++++++++++++++++ src/test/regress/sql/triggers.sql | 35 +++++++++++++++++++++ 4 files changed, 93 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion @ 2020-10-20 22:23 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-10-20 22:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy inheritance has never recursed in that situation, make sure to do that only for new-style partitioning. I noticed this problem while testing a fix for another bug in the vicinity. This has been wrong all along, so backpatch to 11. Discussion: https://postgr.es/m/20201016235925.GA29829@alvherre.pgsql Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5f6463a20af183db10d372f16ddeb5690a92aa1b Modified Files -------------- src/backend/commands/tablecmds.c | 2 ++ src/backend/commands/trigger.c | 21 ------------- src/test/regress/expected/triggers.out | 56 ++++++++++++++++++++++++++++++++++ src/test/regress/sql/triggers.sql | 35 +++++++++++++++++++++ 4 files changed, 93 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion @ 2020-10-20 22:23 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-10-20 22:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy inheritance has never recursed in that situation, make sure to do that only for new-style partitioning. I noticed this problem while testing a fix for another bug in the vicinity. This has been wrong all along, so backpatch to 11. Discussion: https://postgr.es/m/20201016235925.GA29829@alvherre.pgsql Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0e6b6f8c7192c82f62b4bbc0b40e9c6252a67bd1 Modified Files -------------- src/backend/commands/tablecmds.c | 2 ++ src/backend/commands/trigger.c | 21 ------------- src/test/regress/expected/triggers.out | 56 ++++++++++++++++++++++++++++++++++ src/test/regress/sql/triggers.sql | 35 +++++++++++++++++++++ 4 files changed, 93 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion @ 2020-10-20 22:23 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-10-20 22:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion More precisely, correctly handle the ONLY flag indicating not to recurse. This was implemented in 86f575948c77 by recursing in trigger.c, but that's the wrong place; use ATSimpleRecursion instead, which behaves properly. However, because legacy inheritance has never recursed in that situation, make sure to do that only for new-style partitioning. I noticed this problem while testing a fix for another bug in the vicinity. This has been wrong all along, so backpatch to 11. Discussion: https://postgr.es/m/20201016235925.GA29829@alvherre.pgsql Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a795f6782fa8b466ee47bd6d3ff8e9075237d566 Modified Files -------------- src/backend/commands/tablecmds.c | 2 ++ src/backend/commands/trigger.c | 21 ------------- src/test/regress/expected/triggers.out | 56 ++++++++++++++++++++++++++++++++++ src/test/regress/sql/triggers.sql | 35 +++++++++++++++++++++ 4 files changed, 93 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-10-20 22:23 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-10-20 22:23 pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-10-20 22:23 pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-10-20 22:23 pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-10-20 22:23 pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion 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