model-writtenrun 3994 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jakub Wartak reported that roughly 3,000 connections combined with a 1 MB activity-query setting caused signed-integer overflow during activity snapshot allocation, and proposed changing the setting's variable type to size_t in #1.
- Michael Paquier objected that the type change could not be backpatched and recommended casting the multiplication operands in #2, which Jakub implemented in #3; Peter Eisentraut preferred using the correct underlying type in #4.
- Andres Freund explained that size_t was incompatible with the GUC infrastructure, raised remaining 32-bit overflow concerns, and proposed a 4 GB buffer limit in #5; Michael supported an early check and suggested documentation in #6, while Andres emphasized the gigabytes consumed by activity queries in #7.
- Jakub added the startup limit while retaining casts for valid buffers below 4 GB in #8, then revised its error reporting in #10 after Michael requested a configuration error code and user-facing wording in #9.
- Michael committed the allocation-cast portion of #10 as a956bd3fa9, using Size casts and omitting the startup limit, with backpatches through PostgreSQL 12.
- In the final reply #11, Michael explained that the startup restriction conflicted with the intent of earlier huge-allocation support and should be discussed separately; the overflow fix had landed, while restrictions and possible documentation improvements remained deferred.