Re: ALTER INDEX fails on partitioned index

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: ALTER INDEX fails on partitioned index
Дата
Msg-id 20191227035157.GD12890@telsasoft.com
обсуждение исходный текст
Ответ на Re: ALTER INDEX fails on partitioned index  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: ALTER INDEX fails on partitioned index  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Jan 07, 2019 at 04:23:30PM -0300, Alvaro Herrera wrote:
> On 2019-Jan-05, Justin Pryzby wrote:
> > postgres=# CREATE TABLE t(i int)PARTITION BY RANGE(i);
> > postgres=# CREATE INDEX ON t(i) WITH(fillfactor=11);
> > postgres=# ALTER INDEX t_i_idx SET (fillfactor=12);
> > ERROR:  42809: "t_i_idx" is not a table, view, materialized view, or index
> > LOCATION:  ATWrongRelkindError, tablecmds.c:5031
> > 
> > I can't see that's deliberate,
> 
> Well, I deliberately ignored that aspect of the report at the time as it
> seemed to me (per discussion in thread [1]) that this behavior was
> intentional.  However, if I think in terms of things like
> pages_per_range in BRIN indexes, this decision seems to be a mistake,
> because surely we should propagate that value to children.
> 
> [1] https://www.postgresql.org/message-id/flat/CAH2-WzkOKptQiE51Bh4_xeEHhaBwHkZkGtKizrFMgEkfUuRRQg%40mail.gmail.com

Possibly attached should be backpatched through v11 ?

This allows SET on the parent index, which is used for newly created child
indexes, but doesn't itself recurse to children.

I noticed recursive "*" doesn't seem to be allowed for "alter INDEX":
postgres=# ALTER INDEX p_i2* SET (fillfactor = 22);
ERROR:  syntax error at or near "*"
LINE 1: ALTER INDEX p_i2* SET (fillfactor = 22);

Also, I noticed this "doesn't fail", but setting is neither recursively applied
nor used for new partitions.

postgres=# ALTER INDEX p_i_idx ALTER COLUMN 1 SET STATISTICS 123;

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Calling PLpgSQL function with composite type fails with an error: "ERROR: could not open relation with OID ..."
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Autovacuum on partitioned table