pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 6+ messages / 2 participants [nested] [flat]
* pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:06 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 1 reply; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid duplicates in ALTER ... DEPENDS ON EXTENSION If the command is attempted for an extension that the object already depends on, silently do nothing. In particular, this means that if a database containing multiple such entries is dumped, the restore will silently do the right thing and record just the first one. (At least, in a world where pg_dump does dump such entries -- which it doesn't currently, but it will.) Backpatch to 9.6, where this kind of dependency was introduced. Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/899a04f5ed61c3db7a2bd84957ecf530c09fd05a Modified Files -------------- src/backend/catalog/pg_depend.c | 43 ++++++++++++++++++++++ src/backend/commands/alter.c | 7 +++- src/include/catalog/dependency.h | 1 + .../test_extensions/expected/test_extdepend.out | 2 + .../modules/test_extensions/sql/test_extdepend.sql | 2 + 5 files changed, 54 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:06 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid duplicates in ALTER ... DEPENDS ON EXTENSION If the command is attempted for an extension that the object already depends on, silently do nothing. In particular, this means that if a database containing multiple such entries is dumped, the restore will silently do the right thing and record just the first one. (At least, in a world where pg_dump does dump such entries -- which it doesn't currently, but it will.) Backpatch to 9.6, where this kind of dependency was introduced. Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3dfd2d6cd28a125edc4761eaefaa1193f111459d Modified Files -------------- src/backend/catalog/pg_depend.c | 43 ++++++++++++++++++++++ src/backend/commands/alter.c | 7 +++- src/include/catalog/dependency.h | 1 + .../test_extensions/expected/test_extdepend.out | 2 + .../modules/test_extensions/sql/test_extdepend.sql | 2 + 5 files changed, 54 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:06 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid duplicates in ALTER ... DEPENDS ON EXTENSION If the command is attempted for an extension that the object already depends on, silently do nothing. In particular, this means that if a database containing multiple such entries is dumped, the restore will silently do the right thing and record just the first one. (At least, in a world where pg_dump does dump such entries -- which it doesn't currently, but it will.) Backpatch to 9.6, where this kind of dependency was introduced. Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b7739ebecdcc157be2fee348912ae3197383895f Modified Files -------------- src/backend/catalog/pg_depend.c | 43 ++++++++++++++++++++++ src/backend/commands/alter.c | 7 +++- src/include/catalog/dependency.h | 1 + .../test_extensions/expected/test_extdepend.out | 2 + .../modules/test_extensions/sql/test_extdepend.sql | 2 + 5 files changed, 54 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:06 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid duplicates in ALTER ... DEPENDS ON EXTENSION If the command is attempted for an extension that the object already depends on, silently do nothing. In particular, this means that if a database containing multiple such entries is dumped, the restore will silently do the right thing and record just the first one. (At least, in a world where pg_dump does dump such entries -- which it doesn't currently, but it will.) Backpatch to 9.6, where this kind of dependency was introduced. Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/73b31e784d64a4f24644de11d02fa632fe97bfab Modified Files -------------- src/backend/catalog/pg_depend.c | 43 ++++++++++++++++++++++ src/backend/commands/alter.c | 7 +++- src/include/catalog/dependency.h | 2 + .../test_extensions/expected/test_extdepend.out | 2 + .../modules/test_extensions/sql/test_extdepend.sql | 2 + 5 files changed, 55 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:06 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid duplicates in ALTER ... DEPENDS ON EXTENSION If the command is attempted for an extension that the object already depends on, silently do nothing. In particular, this means that if a database containing multiple such entries is dumped, the restore will silently do the right thing and record just the first one. (At least, in a world where pg_dump does dump such entries -- which it doesn't currently, but it will.) Backpatch to 9.6, where this kind of dependency was introduced. Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) Discussion: https://postgr.es/m/20200217225333.GA30974@alvherre.pgsql Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7c094a11c70d4790ae4067023806a026c6fd2fe1 Modified Files -------------- src/backend/catalog/pg_depend.c | 43 ++++++++++++++++++++++ src/backend/commands/alter.c | 7 +++- src/include/catalog/dependency.h | 1 + .../test_extensions/expected/test_extdepend.out | 2 + .../modules/test_extensions/sql/test_extdepend.sql | 2 + 5 files changed, 54 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION @ 2020-03-11 14:13 Alvaro Herrera <alvherre@2ndquadrant.com> parent: Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-03-11 14:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org On 2020-Mar-11, Alvaro Herrera wrote: > Avoid duplicates in ALTER ... DEPENDS ON EXTENSION > Reviewed-by: Ibrar Ahmed, Tom Lane (offlist) I failed to credit Ahsan Hadi as a reviewer here. Apologies. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2020-03-11 14:13 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-11 14:06 pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-03-11 14:13 ` Alvaro Herrera <alvherre@2ndquadrant.com> 2020-03-11 14:06 pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-03-11 14:06 pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-03-11 14:06 pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-03-11 14:06 pgsql: Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 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