Re: ALTER INDEX fails on partitioned index

2020-03-23 Thread Justin Pryzby
On Thu, Feb 27, 2020 at 09:11:14PM -0300, Alvaro Herrera wrote: > On 2020-Feb-27, Justin Pryzby wrote: > > 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

Re: ALTER INDEX fails on partitioned index

2020-02-28 Thread Michael Paquier
On Thu, Feb 27, 2020 at 05:25:13PM -0600, Justin Pryzby wrote: > /* > - * Option parser for partitioned tables > - */ > -bytea * > -partitioned_table_reloptions(Datum reloptions, bool validate) > -{ > - /* > - * There are no options for partitioned tables yet, but this is able to > do >

Re: ALTER INDEX fails on partitioned index

2020-02-27 Thread Alvaro Herrera
On 2020-Feb-27, Justin Pryzby wrote: > 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

Re: ALTER INDEX fails on partitioned index

2020-02-27 Thread Justin Pryzby
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,

Re: ALTER INDEX fails on partitioned index

2019-12-29 Thread Robert Haas
On Thu, Dec 26, 2019 at 10:52 PM Justin Pryzby 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

Re: ALTER INDEX fails on partitioned index

2019-12-26 Thread Justin Pryzby
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:

Re: ALTER INDEX fails on partitioned index

2019-02-06 Thread Alvaro Herrera
On 2019-Jan-05, Justin Pryzby wrote: > 12dev and 11.1: > > 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

Re: ALTER INDEX fails on partitioned index

2019-01-07 Thread Michael Paquier
On Mon, Jan 07, 2019 at 01:34:08PM -0600, Justin Pryzby wrote: > I don't see any discussion regarding ALTER (?) > > Actually, I ran into this while trying to set pages_per_range. > But shouldn't it also work for fillfactor ? Like ALTER TABLE, the take for ALTER INDEX is that we are still lacking

Re: ALTER INDEX fails on partitioned index

2019-01-07 Thread Justin Pryzby
On Mon, Jan 07, 2019 at 04:23:30PM -0300, Alvaro Herrera wrote: > On 2019-Jan-05, Justin Pryzby wrote: > > > 12dev and 11.1: > > > > 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

Re: ALTER INDEX fails on partitioned index

2019-01-07 Thread Alvaro Herrera
On 2019-Jan-05, Justin Pryzby wrote: > 12dev and 11.1: > > 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

ALTER INDEX fails on partitioned index

2019-01-05 Thread Justin Pryzby
12dev and 11.1: 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,