model-writtenrun 8319 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley reported that long remains only 32 bits on 64-bit Windows, risking overflow in incremental-sort disk accounting, and proposed Size for memory fields and uint64 for disk fields in #1.
- Tom Lane initially wanted a broader fix covering work_mem in #2, while David argued that the new PostgreSQL 13 code should at least fix disk accounting in #3, and Peter Eisentraut supported removing inappropriate uses of long in #4.
- James Coleman posted #5, using uint64 for both memory and disk statistics because the code aggregates multiple runs and shares handling of both quantities.
- Peter Geoghegan explained that related tuplesort accounting requires negative values and recommended int64 as the safest replacement for long in #6 and #8.
- After Tom Lane raised ssize_t in #9, James explained that accumulated totals require guaranteed 64-bit capacity even on 32-bit systems and posted the signed-int64 revision in #12; Peter supported that choice in #14, and Tom accepted it when memory and disk accounting share a type in #15.
- David added the issue to the PostgreSQL 13 open-items list in #16, then committed #12 as 6ee3b5fb99 with only whitespace adjustments and a backpatch to PostgreSQL 13, confirming completion in #18; the broader work_mem limitation was outside the landed patch.