model-writtenrun 6037 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Matthijs van der Vleuten reported that setting n_distinct on an index column made both the index and table unusable in PostgreSQL 13 and 14, with manual catalog repair unavailable to the affected RDS user #1; Vik Fearing traced the regression to operator-class parameter support #2.
- Nathan Bossart proposed using operator-class option validation for index columns and added regression tests #3, which Vik Fearing endorsed after independently working toward the same fix #4.
- Michael Paquier argued that the undocumented syntax should instead be rejected because index expression column names are unsuitable identifiers, suggesting column numbers for any future support #6; Dilip Kumar agreed #7, and Nathan supplied a replacement patch that rejected the operation #8.
- Michael identified obsolete ANALYZE handling of index-expression n_distinct overrides and argued for removing it because the feature was broken, undocumented, and unsupported by pg_dump #9; his revised patch removed that code, used existing permission checks to reject option changes, and added partitioned-index coverage #10.
- Nathan approved the revised approach while identifying an incorrect index name in the cleanup test #11; Michael fixed that typo and adjusted a test comment before committing fdd8857145 from #10, then confirmed application and backpatching through PostgreSQL 13 #12.
- After the commit, Matthijs questioned the test typo and whether previously damaged indexes could be dropped #14; Nathan explained that the typo had already been fixed but existing damage still required manual catalog repair, since bypassing the failure in index_open() would require intrusive changes #15.
- The thread ended with the preventive fix committed and backpatched, while automatic repair of existing damage remained unimplemented; Michael suggested a possible release-note mention and noted that logical dumps discard the problematic options #16.