model-writtenrun 4629 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Anban Company reported a PostgreSQL 15.2 assertion failure involving a rank() result and a subquery-containing filter #1; Tom Lane traced it to WindowAgg run-condition pushdown bypassing the normal safety checks and challenged the safety of the entire path #2.
- David Rowley proposed distinguishing ordinary pushdown safety from eligibility for window run conditions #3; after Tom suggested removing the special pushdown logic #4, David explained that window-function filters cannot legally become subquery WHERE clauses #5.
- Tom agreed that run conditions should bypass only the partition-column restriction while satisfying all other safety checks, supporting a refactor that reused those checks #6.
- David implemented per-column hazard flags and a three-way safety result, also preventing run conditions involving volatile window-function arguments #7; Tom approved the approach and requested capitalization and formatting changes #8.
- David committed the patch as eb7d043c9b, with naming and formatting changes, preserved pseudoconstant restrictions, an additional WindowFunc subplan check, and regression tests; the fix was also backpatched to PostgreSQL 15.
- After committing, David posted a discussion-only delta to centralize the pseudoconstant check, leaving its rationale undocumented pending clarification #9; Tom explained that one-time filters belong high in the plan to avoid the most work #10, leaving the main fix landed and the optional cleanup uncommitted in the supplied record.