git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f22feed) | patch
Fix assertion failure with ALTER TABLE ATTACH PARTITION and indexes
Tue, 3 Mar 2020 04:56:11 +0000 (13:56 +0900)
Tue, 3 Mar 2020 04:56:11 +0000 (13:56 +0900)
commit dc8364824f80cf60f8d2f5a617b0470992e293dd
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
src/backend/parser/parse_utilcmd.c diff | blob | blame | history
src/test/regress/expected/indexing.out diff | blob | blame | history
src/test/regress/sql/indexing.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /