model-writtenrun 9095 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alvaro Herrera reported that parallel restore could create a foreign key before the referenced partitioned table's index partitions were ready, with failures varying by worker count and dump mode #1.
- His attached patch made each foreign-key constraint depend on the referenced index's partition attachment objects, eliminating the failures in his testing #1.
- The implementation introduced a pointer-list type and scanned the referenced table's indexes; Alvaro considered storing dump IDs instead but found the required casts awkward, and accepted the scan because tables normally have few indexes #1.
- Alvaro committed the patch as 1752e35163, adding defensive checks and local cleanup while preserving its approach, with a backpatch to PostgreSQL 12.
- Alvaro confirmed the push but reported that parallel restore of partitioned tables containing data and unique keys still encountered deadlocks, leaving that problem unresolved at the thread's end #2.