Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

2021-11-01 Thread Michael Paquier
On Sat, Oct 30, 2021 at 09:45:50AM +0900, Michael Paquier wrote: > Another thing that could be done is to mark the index as invalid once > its set of opclass parameters is updated. That would be simpler, > while allowing users to fire a concurrent or non-concurrent rebuild at > will after an ALTER

Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET, RESET}

2021-10-29 Thread Michael Paquier
On Fri, Oct 29, 2021 at 06:23:34PM +, Bossart, Nathan wrote: > This is my concern as well. I remember seeing some weird errors in > the thread that led to fdd8857, and I was able to reproduce it with > this new patch. If you apply the following patch for the hstore test, > it will begin faili

Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

2021-10-29 Thread Michael Paquier
On Fri, Oct 29, 2021 at 11:15:08PM +0300, Alexander Korotkov wrote: > All these cases require index rebuild to change the opclass option. I > can imagine there could be options, which don't require index rebuild > to change. For instance, a split algorithm for R-tree-like GiST index > could be ch

Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

2021-10-29 Thread Alexander Korotkov
Hi, Michael! On Fri, Oct 29, 2021 at 12:10 PM Michael Paquier wrote: > On Fri, Oct 29, 2021 at 02:09:34PM +0900, Michael Paquier wrote: > > The attached does the work, with tests and documentation added to all > > the places I could think about while reviewing the existing opclass > > code for in

Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET, RESET}

2021-10-29 Thread Bossart, Nathan
On 10/29/21, 2:14 AM, "Michael Paquier" wrote: > By the way, while looking at this area of the code (particularly > tsvector and gist), I was under the impression that it is safe to > assume that we don't particularly need to rebuild the index when > changing its attoptions this way, but I have al

Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

2021-10-29 Thread Michael Paquier
On Fri, Oct 29, 2021 at 02:09:34PM +0900, Michael Paquier wrote: > The attached does the work, with tests and documentation added to all > the places I could think about while reviewing the existing opclass > code for indexes. There is no need to worry about pg_dump, as opclass > parameters are lo

Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

2021-10-28 Thread Michael Paquier
Hi all, Since 911e702 (13~), it is possible to define opclass parameters for index attributes as of CREATE INDEX, but we lack an equivalent grammar for ALTER INDEX. I was looking at that, and it seems natural to me to do the same thing as what we do for SET STATISTICS, where we use a column numbe