model-writtenrun 2639 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported a SQLsmith-discovered failure involving a partitioned table and an EXISTS subquery, producing an unrecognized-node error in ExecInitExprRec #1.
- Tom Lane traced the failure to AlternativeSubPlan nodes surviving inside partition-pruning expressions and supplied a patch applying expression fixups to initial and execution-time pruning steps for Append and MergeAppend nodes #2.
- Tom Lane committed the fix with signature adaptations and a regression test as 45004f527a, backpatching through PostgreSQL 13 because other omitted expression processing could cause additional bugs even where the reported symptom did not occur.
- After the commit, Zhang Mingli confirmed that the patch worked, suggested adding a test, and asked why EXPLAIN retained an apparently unused subplan; this post-commit testing does not qualify for suggested review credit #3.
- Tom Lane explained that planning creates parameterized and hashed alternatives before choosing one, leaving the unused alternative because removing it was complicated and it would not execute; the thread ended with the fix committed and that separate cleanup unchanged #4.