pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde @ 2020-03-03 04:57 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2020-03-03 04:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failure with ALTER TABLE ATTACH PARTITION and indexes Using ALTER TABLE ATTACH PARTITION causes an assertion failure when attempting to work on a partitioned index, because partitioned indexes cannot have partition bounds. The grammar of ALTER TABLE ATTACH PARTITION requires partition bounds, but not ALTER INDEX, so mixing ALTER TABLE with partitioned indexes is confusing. Hence, on HEAD, prevent ALTER TABLE to attach a partition if the relation involved is a partitioned index. On back-branches, as applications may rely on the existing behavior, just remove the culprit assertion. Reported-by: Alexander Lakhin Author: Amit Langote, Michael Paquier Discussion: https://postgr.es/m/16276-5cd1dcc8fb8be7b5@postgresql.org Backpatch-through: 11 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0b48f1335dddb7141160e392cccac98edfb3fa85 Modified Files -------------- src/backend/parser/parse_utilcmd.c | 12 ++++++++++-- src/test/regress/expected/indexing.out | 17 +++++++++++++++++ src/test/regress/sql/indexing.sql | 10 ++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde @ 2020-03-03 04:57 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2020-03-03 04:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failure with ALTER TABLE ATTACH PARTITION and indexes Using ALTER TABLE ATTACH PARTITION causes an assertion failure when attempting to work on a partitioned index, because partitioned indexes cannot have partition bounds. The grammar of ALTER TABLE ATTACH PARTITION requires partition bounds, but not ALTER INDEX, so mixing ALTER TABLE with partitioned indexes is confusing. Hence, on HEAD, prevent ALTER TABLE to attach a partition if the relation involved is a partitioned index. On back-branches, as applications may rely on the existing behavior, just remove the culprit assertion. Reported-by: Alexander Lakhin Author: Amit Langote, Michael Paquier Discussion: https://postgr.es/m/16276-5cd1dcc8fb8be7b5@postgresql.org Backpatch-through: 11 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dc8364824f80cf60f8d2f5a617b0470992e293dd Modified Files -------------- src/backend/parser/parse_utilcmd.c | 1 - src/test/regress/expected/indexing.out | 16 ++++++++++++++++ src/test/regress/sql/indexing.sql | 10 ++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde @ 2020-03-03 04:57 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2020-03-03 04:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failure with ALTER TABLE ATTACH PARTITION and indexes Using ALTER TABLE ATTACH PARTITION causes an assertion failure when attempting to work on a partitioned index, because partitioned indexes cannot have partition bounds. The grammar of ALTER TABLE ATTACH PARTITION requires partition bounds, but not ALTER INDEX, so mixing ALTER TABLE with partitioned indexes is confusing. Hence, on HEAD, prevent ALTER TABLE to attach a partition if the relation involved is a partitioned index. On back-branches, as applications may rely on the existing behavior, just remove the culprit assertion. Reported-by: Alexander Lakhin Author: Amit Langote, Michael Paquier Discussion: https://postgr.es/m/16276-5cd1dcc8fb8be7b5@postgresql.org Backpatch-through: 11 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/75839fcf829f25f6b1c78416a6161617285fe201 Modified Files -------------- src/backend/parser/parse_utilcmd.c | 1 - src/test/regress/expected/indexing.out | 16 ++++++++++++++++ src/test/regress/sql/indexing.sql | 10 ++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-03-03 04:57 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-03 04:57 pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde Michael Paquier <michael@paquier.xyz> 2020-03-03 04:57 pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde Michael Paquier <michael@paquier.xyz> 2020-03-03 04:57 pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde Michael Paquier <michael@paquier.xyz>
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