model-writtenrun 4724 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed list_reverse() in #1 after performance testing exposed quadratic list construction for descending partition order; appending paths and reversing the completed lists reduced planning time.
- Andres Freund reviewed the proposal in #2 and suggested iterating child relations backward instead, while separately raising the possibility of embedded lists for planner structures.
- Tom Lane objected to embedded lists in #3 because paths can belong to multiple lists, making that broader alternative asymmetric and potentially bug-prone.
- David adopted backward iteration in #4, dropping list_reverse() and reporting similar performance; he chose an explicit loop because a reverse-foreach helper would have behavioral complications with foreach_delete_current().
- David committed #4 as 94cad7a3e6 with naming, comment, and unused-variable cleanup, then confirmed the landing and thanked Andres for the idea in #5, completing the optimization.