model-writtenrun 315 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zsolt Parragi reported that concurrent REPACK failed on invalid unique indexes while ordinary REPACK handled them, and proposed suppressing constraints when copying invalid indexes in #1.
- Alvaro Herrera suggested ignoring invalid indexes instead in #2 and #4, but Zsolt demonstrated that ready-but-invalid indexes still enforce uniqueness and cannot safely retain stale storage after a heap rewrite in #5.
- Zsolt's replacement patch in #6 skipped indexes that were neither valid nor ready, preserved rebuilding for maintained indexes and storage changes, and extended this behavior through reindex_relation() to other commands.
- Kyotaro Horiguchi challenged that design in #8, arguing that REPACK should reject tables containing invalid indexes and require users to drop or explicitly reindex them.
- Zsolt identified lost index-repair behavior in #9, and Ewan Young confirmed broader regressions involving heap rewrites, materialized-view refreshes, TRUNCATE, and TOAST-index diagnostics in #10, favoring the original patch for the imminent release.
- Christophe Pettus supported restricting the new rejection policy to REPACK in #11 and #13, and Alvaro adopted that direction in #15, leaving possible changes to CLUSTER and VACUUM FULL for later discussion.
- Alvaro supplied the replacement implementation in #16, then committed it with light edits as e14a2354d9; his announcement in #18 acknowledged limited consensus and temporarily kept the open item active.
- Shihao Zhong reproduced the remaining ready-but-invalid case in #19: ordinary REPACK still succeeded while concurrent REPACK failed after copying the table, so his follow-up changed the rejection predicate to !indisvalid.
- Robert Treat endorsed the follow-up in #20 but questioned its direct catalog-update test; Alvaro committed the logic with rewritten comments, omitted tests, and added documentation as 0cabab44f1, confirming those choices in #21.
- By #22, both fixes had landed and REPACK rejected every invalid index; Robert favored postponing further design changes until PostgreSQL 20 and user feedback, while an optional rebuild mode and injection-point coverage remained discussion ideas.