model-writtenrun 8945 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yuzuko Hosoya reported that EXPLAIN misleadingly displayed a partition when no partition matched, and David Rowley explained that the executor retained an unexecuted child so EXPLAIN could resolve output Vars #1 #2.
- Amit Langote argued that the display looked like a pruning bug, while Tom Lane emphasized that expressions above an Append still needed valid Var resolution and suggested consulting the original Plan tree #3 #6 #9.
- Tom's initial patch removed the retained child, but his EXPLAIN VERBOSE example with an upper Sort crashed; he therefore identified missing test coverage and proposed targeting PostgreSQL 13 rather than treating the cosmetic issue as a PostgreSQL 12 blocker #11 #13.
- Amit supplied an alternative that hid the retained child and then added regression expectations, but David objected that hiding an initialized node would conceal real activity such as index locking, and Amit accepted that objection #14 #16 #17 #18.
- David then implemented actual full pruning with a deparser that tracked both Plans and PlanStates, preferring surviving initialized children and falling back to planned children; he noted that this could leave references to SubPlans whose definitions were no longer displayed #19.
- After rebasing over pgindent, David adapted the patch to List changes, improved comments and added a test of the output targetlist above a fully pruned MergeAppend #21 #22.
- Tom rejected carrying both Plans and nullable PlanStates and argued that Vars above an Append should consistently use the inheritance parent's name; David raised inheritance and UNION ALL cases, and Amit demonstrated that existing inheritance output could also name a child instead of its parent #23 #24 #25 #27 #29.
- After several months, Tom posted a Plan-only deparser that accessed PlannedStmt subplans and included SubPlan nodes in the ancestor list, but it still lost aliases when the first planned child had been pruned #35.
- Tom proposed retaining AppendRelInfo mappings and adding parent-relid sets to Append and MergeAppend so EXPLAIN could assign parent aliases and translate child Vars back to inheritance parents, including partitionwise joins #36.
- Tom assembled three patches containing the deparser conversion, inheritance-parent mapping and David's remaining executor-pruning work; the mapping preserved child names below appends and used parent names above them, without mapping through UNION ALL parents #37.
- The first two patches from #37 landed together without content changes as 6ef77cf46e, providing consistent aliases and removing the deparser's dependence on surviving child PlanStates.
- David's executor-pruning patch from #37 landed unchanged as 5935917ce5, allowing startup pruning to remove every Append or MergeAppend child.
- At the thread's last message, Tom reported that the new verbose regression test failed on buildfarm configurations using force_parallel_mode = regress and had temporarily removed that test while leaving the implementation committed #38.
- The subsequent 22864f6e02 restored the test without ANALYZE after identifying unmasked Worker lines as the cause, resolving the test failure raised in #38 without changing pruning logic.