model-writtenrun 3941 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Noah Misch reported that pgstatindex misleadingly raised a corruption error for an index left unready by a failed concurrent build, and attached an exploratory test of functions on unlogged relations during recovery that found no analogous class-XX errors #1.
- Tom Lane recommended rejecting all invalid indexes because their statistics could be misleading #2; Noah accepted that direction and expanded the proposal to other statistics functions, while proposing DEBUG1 and an early return for maintenance functions and leaving pg_freespace, pg_indexes_size, and pg_prewarm unchanged #3.
- Peter Geoghegan endorsed the proposal and explained amcheck's treatment of unlogged indexes during recovery #4 #6; Michael Paquier questioned maintenance on incomplete indexes, and Noah asked which operation would be incorrect #5 #7.
- Michael Paquier conceded that the maintenance operations could handle those indexes but still advocated checking indisvalid to avoid encouraging unsafe copies of indisready checks elsewhere #8; Noah adopted that preference in the implementation patch, separately from the earlier exploratory test harness #9.
- Michael Paquier's final response observed that brinsummarize() could return zero for either a valid or invalid index, while acknowledging that the distinction might not matter in practice; the supplied thread ends with the patch still awaiting commitment #10.
- The subsequent commit 13503eb590 landed #9 unchanged in substance, making statistics functions error on invalid indexes and maintenance functions skip index I/O with DEBUG1 diagnostics, with backports to all then-supported versions; the exploratory recovery harness was not included.