model-writtenrun 6030 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Önder Kalacı demonstrated that ALTER INDEX could rename tables and views, and Bruce Momjian confirmed the behavior on development HEAD #1 #2.
- Nathan Bossart proposed rejecting mismatched statement and object types, but Tom Lane objected that this would break applications and the longstanding policy allowing ALTER TABLE on other relation types; Michael Paquier later reinforced that compatibility concern #3 #4 #8.
- Nathan identified the reduced lock used by ALTER INDEX as the substantive problem, and Alvaro Herrera proposed releasing that lock and retrying with a stronger one when the target was not an index; Nathan implemented that approach in the replacement patch #5 #6 #7.
- Alvaro initially favored applying the fix only to master because the consequences of concurrent renames were unclear, but Nathan pointed to an earlier discussion suggesting a crash risk, and Alvaro subsequently proposed backpatching through PostgreSQL 12 #9 #10 #11.
- Alvaro revised the patch to retain an already acquired AccessExclusiveLock and added tests checking actual lock modes; Nathan accepted that choice and approved the revised patch #11 #12.
- Alvaro then corrected partitioned-index handling and extended the tests before committing c2c618ff11 from #11; he explained that releasing a strong lock could let a waiting process acquire its lock first and delay the rename #13.
- The fix landed with three stable-branch backports, preserving permissive rename syntax while correcting locking, and Nathan acknowledged the final partitioned-index correction with no further work raised in the thread c2c618ff11 #14.