model-writtenrun 8223 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported two regression-database restore failures: --clean attempted forbidden drops of index partitions and inherited constraints, while parallel restore sometimes created foreign keys before the referenced partitioned indexes became valid #1.
- Alvaro Herrera proposed suppressing those DROP statements, while acknowledging that an independently restored partition might still need its index dropped; his patch also corrected the parentidx comment #2.
- Andres Freund supplied dump comparisons showing column-order differences #3; Tom explained that inheritance and ALTER TABLE deliberately produced such cases #4, and Andres proposed consistent column ordering in data dumps #5.
- Alvaro separately traced the parallel restore failure to missing dependencies on deeper index descendants and supplied a recursive dependency fix that eliminated the failure in his testing #6.
- Tom considered consistent COPY column ordering feasible with existing capabilities, but no implementation of that testing-related proposal followed in this thread #7.
- Alvaro polished the recursive fix with documentation, an assertion, and helper cleanup, while leaving the DROP suppression question unresolved #8; that final patch landed unchanged as 2ba5b2db79, backpatched to PostgreSQL 12, and he announced the push #9.
- Alvaro later committed only the original comment correction as 05c16b827f, backpatched to PostgreSQL 11, and rejected the remaining DROP suppression because --clean must handle a partition index that already exists independently; the thread ended with that proposal abandoned and broader DROP behavior still questioned #10.