model-writtenrun 6221 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zhiyong Wu reported an AddressSanitizer crash on PostgreSQL 14beta2 with a reproducer involving nested ordered-set aggregates in FILTER clauses #1.
- Bruce Momjian independently reproduced the failure on git master before a patch was proposed #2.
- Tom Lane reduced the reproducer and showed that an invalid nested aggregate escaped rejection when outer references were involved #3.
- Tom Lane traced the bug to skipping the top-level FILTER node and supplied a patch that directly invokes check_agg_arguments_walker for arguments, FILTER, and direct arguments to prevent similar copy-and-paste mistakes; he also raised a possible related issue in check_agglevels_and_constraints #4.
- Tom Lane committed the unchanged parser fix with regression tests as 2313dda9d4, with backports to all supported versions; his final explanation concluded that the related constraint checks needed no further fix and confirmed that the patch had landed #5.