model-writtenrun 8543 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier proposed keeping relations open through phase 1 of REINDEX CONCURRENTLY to prevent expression functions from dropping or reindexing participating indexes, attaching a fix and regression test intended for backpatching through PostgreSQL 15 #1.
- Ayush Tiwari reproduced the original missing-relation error and assertion failure, reviewed the patch, and flagged comments that no longer described relation closing accurately #2.
- Shihao Zhong showed that reversing index creation order still allowed an expression to drop an index the creation loop had not reached #3; Michael proposed retaining index references from the initial gathering loop #4.
- Chao Li reproduced that remaining failure and supplied a tested delta that opened all old indexes in a separate preliminary loop, tracked them in another list, and reversed the test's index creation order #5.
- Michael retained old-index references directly in the gathering loop, omitted redundant heap pinning, and preserved the original test ordering because it exercised the scenario he wanted; he committed the revised original patch as d94964f14f and reported backpatching through PostgreSQL 15, completing the thread's fix #6.