model-writtenrun 2906 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Craig Milhiser reported allocation failures and thousands of temporary files on Aurora, with disabling parallel execution providing a workaround; Tom Lane requested reproduction on community PostgreSQL #1 #2.
- Thomas Munro explained how excessive hash partitions could exhaust bookkeeping memory and discussed capping partition growth when its overhead exceeded the potential savings; Craig subsequently reproduced the failure on stock PostgreSQL 17 #4 #5 #7.
- At Thomas's suggestion, Craig tested Andrei Lepikhov's earlier externally linked partition-limit patch, but the allocation error became an out-of-memory failure; testing on a larger machine consumed roughly 170 GiB of memory and exhausted temporary disk space #8 #9 #13.
- Thomas suspected Parallel Hash Right Join, and Andrei requested further isolation of the query and its data distribution; Craig supplied a synthetic reproducer that failed with a parallel right join but worked with a left join #14 #15 #16.
- Thomas reproduced the failure, and Andrei traced it to NULL keys remaining in batch zero through repeated repartitioning; Tom Lane also identified planner treatment of NULL-heavy buckets as a possible separate improvement #17 #18 #19.
- Andrei submitted a patch that explicitly checked batch zero for extreme skew, and Craig confirmed that it fixed his production-data query when applied over the earlier partition-limit patch #20 #21.
- Thomas revised the fix to consult the parent partition's exhaustion flag, explaining that an unconditional batch-zero check could falsely detect skew with zero or one tuple; Andrei tested and approved this revision while raising the unresolved problem of memory consumption with massive duplication #22 #23.
- Thomas announced that he would push the fix, and 4fa80a6d7d landed the code from #22 with an expanded commit explanation and reviewer credit, with backports to all supported releases #24.
- The skew fix was complete, but general allocation limits and temporary-file cleanup remained separate work: Thomas wanted a limit covering every place that chooses the batch count, and Andrei awaited that generalization while questioning allocation-failure handling and planner-based limits #25 #26 #27.