model-writtenrun 3486 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tinghai Zhao reported an assertion failure when EXISTS stops an aggregate with grouping sets early and attached a patch explicitly freeing aggregate-sort tape buffers, while expressing concern about adding node-specific handling to subplan execution #1.
- Tom Lane reproduced and bisected the failure, identified the assertion itself as incorrect, and recommended removing it instead of adding caller-side cleanup, also noting risks during transaction-abort cleanup #2.
- Jeff Davis identified a separate ambiguity in the LogicalTapeSetBlocks() comment and proposed documenting that its count excludes still-buffered data #3.
- Tom Lane explained that callers use the count for statistics or tracing and endorsed the comment clarification, leaving agreement on both fixes at the thread's last message #4.
- Jeff Davis subsequently committed the assertion removal for PostgreSQL 13 and 14, where it remained present; the attached buffer-cleanup approach was not adopted a1a51dc4fa.
- Jeff Davis separately committed the comment clarification and backpatched it through PostgreSQL 13, completing the two changes agreed in discussion bc5fcaa289.