Re: ALTER INDEX fails on partitioned index - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ALTER INDEX fails on partitioned index
Date
Msg-id CA+Tgmobq8_-DS7qDEmMi-4ARP1_0bkgFEjYfiK97L2eXq+Q+nw@mail.gmail.com
Whole thread Raw
In response to Re: ALTER INDEX fails on partitioned index  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: ALTER INDEX fails on partitioned index  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Thu, Dec 26, 2019 at 10:52 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> 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;

Seems a little hard to believe that this needs no other code changes.
And what about documentation updates?

BTW, if we don't do this, we should at least try to improve the error
message. Telling somebody that something they created using CREATE
INDEX is not an index will not win us any friends. A more specific
error message, saying that the operation is not supported for
partitioned indexes, seems better.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Assert failure due to "drop schema pg_temp_3 cascade" fortemporary tables and \d+ is not showing any info after drooping temp table schema
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Block level parallel vacuum