Re: ALTER INDEX fails on partitioned index

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: ALTER INDEX fails on partitioned index
Дата
Msg-id 20200227232513.GE29456@telsasoft.com
обсуждение исходный текст
Ответ на Re: ALTER INDEX fails on partitioned index  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: ALTER INDEX fails on partitioned index  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: ALTER INDEX fails on partitioned index  (Michael Paquier <michael@paquier.xyz>)
Re: ALTER INDEX fails on partitioned index  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
The attached allows CREATE/ALTER to specify reloptions on a partitioned table
which are used as defaults for future children.

I think that's a desirable behavior, same as for tablespaces.  Michael
mentioned that ALTER INDEX ONLY doesn't exist, but that's only an issue if
ALTER acts recursively, which isn't the case here.

The current behavior seems unreasonable: CREATE allows specifying fillfactor,
which does nothing, and unable to alter it, either:

postgres=# CREATE TABLE tt(i int)PARTITION BY RANGE (i);;
CREATE TABLE
postgres=# CREATE INDEX ON tt(i)WITH(fillfactor=11);
CREATE INDEX
postgres=# \d tt
...
    "tt_i_idx" btree (i) WITH (fillfactor='11')
postgres=# ALTER INDEX tt_i_idx SET (fillfactor=12);
ERROR:  "tt_i_idx" is not a table, view, materialized view, or index

Maybe there are other ALTER commands to handle (UNLOGGED currently does nothing
on a partitioned table?, STATISTICS, ...).

The first patch makes a prettier message, per Robert's suggestion.

-- 
Justin

Вложения

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

Предыдущее
От: legrand legrand
Дата:
Сообщение: Re: Implementing Incremental View Maintenance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Rethinking opclass member checks and dependency strength