pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix pg_dump for disabled triggers on partitioned tables 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_dump for disabled triggers on partitioned tables @ 2021-07-16 21:50 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2021-07-16 21:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump for disabled triggers on partitioned tables pg_dump failed to preserve the 'enabled' flag (which can be not only disabled, but also REPLICA or ALWAYS) for partitions which had it changed from their respective parents. Attempt to handle that by including a definition for such triggers in the dump, but replace the standard CREATE TRIGGER line with an ALTER TRIGGER line. Backpatch to 11, where these triggers can exist. In branches 11 and 12, pick up a few test lines from commit b9b408c48724 to verify that pg_upgrade is okay with these arrangements. Co-authored-by: Justin Pryzby <pryzby@telsasoft.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f0e21f2f61675f4e56ae53d32ea54d587a7c2257 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 94 ++++++++++++++++++++++++++++-- src/bin/pg_dump/pg_dump.h | 1 + src/bin/pg_dump/t/002_pg_dump.pl | 73 ++++++++++++++++++++--- src/test/regress/expected/sanity_check.out | 2 + src/test/regress/expected/triggers.out | 5 ++ src/test/regress/sql/triggers.sql | 5 ++ 6 files changed, 167 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_dump for disabled triggers on partitioned tables @ 2021-07-16 21:50 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2021-07-16 21:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump for disabled triggers on partitioned tables pg_dump failed to preserve the 'enabled' flag (which can be not only disabled, but also REPLICA or ALWAYS) for partitions which had it changed from their respective parents. Attempt to handle that by including a definition for such triggers in the dump, but replace the standard CREATE TRIGGER line with an ALTER TRIGGER line. Backpatch to 11, where these triggers can exist. In branches 11 and 12, pick up a few test lines from commit b9b408c48724 to verify that pg_upgrade is okay with these arrangements. Co-authored-by: Justin Pryzby <pryzby@telsasoft.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3c5b7c6286215de41ba0a327d065876ff8bc26b2 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 94 ++++++++++++++++++++++++++++-- src/bin/pg_dump/pg_dump.h | 1 + src/bin/pg_dump/t/002_pg_dump.pl | 73 ++++++++++++++++++++--- src/test/regress/expected/sanity_check.out | 2 + src/test/regress/expected/triggers.out | 5 ++ src/test/regress/sql/triggers.sql | 5 ++ 6 files changed, 167 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_dump for disabled triggers on partitioned tables @ 2021-07-16 21:50 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2021-07-16 21:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump for disabled triggers on partitioned tables pg_dump failed to preserve the 'enabled' flag (which can be not only disabled, but also REPLICA or ALWAYS) for partitions which had it changed from their respective parents. Attempt to handle that by including a definition for such triggers in the dump, but replace the standard CREATE TRIGGER line with an ALTER TRIGGER line. Backpatch to 11, where these triggers can exist. In branches 11 and 12, pick up a few test lines from commit b9b408c48724 to verify that pg_upgrade is okay with these arrangements. Co-authored-by: Justin Pryzby <pryzby@telsasoft.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cc340af3345370c7faf0ceba7dece97b40312cb2 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 94 ++++++++++++++++++++++++++++-- src/bin/pg_dump/pg_dump.h | 1 + src/bin/pg_dump/t/002_pg_dump.pl | 73 ++++++++++++++++++++--- src/test/regress/expected/sanity_check.out | 2 + src/test/regress/expected/triggers.out | 5 ++ src/test/regress/sql/triggers.sql | 5 ++ 6 files changed, 167 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_dump for disabled triggers on partitioned tables @ 2021-07-16 21:50 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2021-07-16 21:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump for disabled triggers on partitioned tables pg_dump failed to preserve the 'enabled' flag (which can be not only disabled, but also REPLICA or ALWAYS) for partitions which had it changed from their respective parents. Attempt to handle that by including a definition for such triggers in the dump, but replace the standard CREATE TRIGGER line with an ALTER TRIGGER line. Backpatch to 11, where these triggers can exist. In branches 11 and 12, pick up a few test lines from commit b9b408c48724 to verify that pg_upgrade is okay with these arrangements. Co-authored-by: Justin Pryzby <pryzby@telsasoft.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5992c94dc7e4782760094a13be632a39ba4beffd Modified Files -------------- src/bin/pg_dump/pg_dump.c | 94 ++++++++++++++++++++++++++++-- src/bin/pg_dump/pg_dump.h | 1 + src/bin/pg_dump/t/002_pg_dump.pl | 73 ++++++++++++++++++++--- src/test/regress/expected/sanity_check.out | 5 ++ src/test/regress/expected/triggers.out | 14 +++++ src/test/regress/sql/triggers.sql | 15 +++++ 6 files changed, 189 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_dump for disabled triggers on partitioned tables @ 2021-07-16 21:50 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2021-07-16 21:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump for disabled triggers on partitioned tables pg_dump failed to preserve the 'enabled' flag (which can be not only disabled, but also REPLICA or ALWAYS) for partitions which had it changed from their respective parents. Attempt to handle that by including a definition for such triggers in the dump, but replace the standard CREATE TRIGGER line with an ALTER TRIGGER line. Backpatch to 11, where these triggers can exist. In branches 11 and 12, pick up a few test lines from commit b9b408c48724 to verify that pg_upgrade is okay with these arrangements. Co-authored-by: Justin Pryzby <pryzby@telsasoft.com> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20200930223450.GA14848@telsasoft.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ccfc3cbb341abf515d930097c4851d9e2152504f Modified Files -------------- src/bin/pg_dump/pg_dump.c | 94 ++++++++++++++++++++++++++++-- src/bin/pg_dump/pg_dump.h | 1 + src/bin/pg_dump/t/002_pg_dump.pl | 73 ++++++++++++++++++++--- src/test/regress/expected/sanity_check.out | 5 ++ src/test/regress/expected/triggers.out | 14 +++++ src/test/regress/sql/triggers.sql | 15 +++++ 6 files changed, 189 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2021-07-16 21:50 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 21:50 pgsql: Fix pg_dump for disabled triggers on partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-07-16 21:50 pgsql: Fix pg_dump for disabled triggers on partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-07-16 21:50 pgsql: Fix pg_dump for disabled triggers on partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-07-16 21:50 pgsql: Fix pg_dump for disabled triggers on partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-07-16 21:50 pgsql: Fix pg_dump for disabled triggers on partitioned tables 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