model-writtenrun 6296 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed removing the Windows 2GB hash-memory limit to fix PostgreSQL 13/14 hash-aggregation performance regressions, replacing long-based calculations with size_t byte limits while leaving the broader work_mem restriction for later #1.
- Andres Freund reviewed the patch, suggested considering 64-bit arithmetic, and requested parentheses around the skew-memory multiplication; he also advocated eliminating long more broadly, an idea Bruce Momjian supported #2 #3.
- Tom retained size_t as the appropriate memory-size type and explicit overflow protection, accepted the parentheses change, and explained that a comprehensive cleanup could not serve as a backpatchable regression fix #4.
- Ranier Vilela volunteered to help with the broader cleanup #5, while Tom committed the submitted fix with the requested parentheses and removal of the unused get_hash_mem() compatibility wrapper on the development branch; the change was also backpatched through PostgreSQL 13 28d936031a.
- After the commit, Tom and Ranier discussed choosing size_t or int64 case by case and locating long-suffixed constants, while Michael Paquier suggested exploring enforcement through c.h #6 #7 #8.
- Alvaro Herrera and Dagfinn Ilmari Mannsåker supplied searches for integer suffixes, Tom favored requiring integer-constant macros, and Alvaro suggested automated checking similar to perlcritic #9 #10 #11 #12.
- The targeted hash-memory fix had landed, but broader removal or enforcement against long remained unresolved when Andres warned that system headers themselves use long #13.