pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Fix assertion failure with ALTER TABLE ATTACH PARTITION and inde
Дата
Msg-id E1j8zcc-0005fX-5u@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: pgsql: Fix the name of the first WAL segment file, in docs.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Remove overzealous _bt_split() assertions.