Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable
Vik Fearing <vik@postgresfriends.org>
From: Vik Fearing <vik@postgresfriends.org>
To: "Bossart, Nathan" <bossartn@amazon.com>,
"postgresql@zr40.nl" <postgresql@zr40.nl>,
Alexander Korotkov <aekorotkov@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-10-13T00:30:09Z
Lists: pgsql-bugs, pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Block ALTER INDEX/TABLE index_name ALTER COLUMN colname SET (options)
- 85dc4292a7a1 13.5 landed
- b1b797ec71a1 14.1 landed
- fdd88571454e 15.0 landed
On 10/13/21 2:06 AM, Bossart, Nathan wrote: > On 10/11/21, 11:03 AM, "Vik Fearing" <vik@postgresfriends.org> wrote: >> On 10/11/21 5:25 PM, PG Bug reporting form wrote: >>> >>> User 'musttu' on IRC reported the following bug: After running "ALTER INDEX >>> some_idx ALTER COLUMN expr SET (n_distinct=100)", the index and table become >>> unusable. All further statements involving the table result in: "ERROR: >>> operator class text_ops has no options". >>> >>> They reported this on the RDS version of 13.3, but I've been able to >>> reproduce this on Debian with 13.4 and 14.0. It does not reproduce on 12.8, >>> all statements succeed on that version. >> >> This was broken by 911e702077 (Implement operator class parameters). > > Moving to pgsql-hackers@. > > At first glance, it looks like ALTER INDEX .. ALTER COLUMN ... SET > uses the wrong validation function. I've attached a patch where I've > attempted to fix that and added some tests. Ah, thank you. I was in the (slow) process of writing basically this exact patch. So I'll stop now and endorse yours. -- Vik Fearing