model-writtenrun 552 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tristan Partin proposed SQL introspection of built-in and extension statistics kinds, including entry counts and per-entry shared-memory sizes, in #1 and supplied the initial implementation in #2.
- Michael Paquier requested stable tests and additional metadata in #3; after Tristan questioned exposing callback internals in #4, Michael accepted a smaller interface centered on fixed_amount, write_to_file and accessed_across_databases in #5.
- Solai reported successful testing of the initial view and function and suggested exposing track_entry_count explicitly in #8, while Tristan's revision in #9 added the agreed metadata flags, filtered tests to built-in kinds and made unknown shared sizes NULL.
- Bertrand Drouvot objected to including pgstat_internal.h in pgstatfuncs.c and questioned reporting a count of one for fixed-amount kinds in #11; Michael proposed moving the function into activity/pgstat_kind.c in #12, which Bertrand supported in #13.
- Sami Imseih proposed clearer entry_size and entry_count names, payload-size reporting and zero rather than NULL counts in #15, but Michael defended NULL for unknown counts in #16, with Bertrand and Sami accepting that choice in #17 and #18.
- Michael supplied the consolidated revision in #19, moving the function, applying the naming changes and returning NULL counts for fixed-amount kinds, while retaining shared_size as the size source; Bertrand approved it and suggested 'registered' terminology in #20.
- Sami pointed out that the proposed size still excluded hash-entry overhead and could misrepresent actual memory consumption in #21, so Michael deferred the size column in #22, with Sami's agreement in #23.
- Michael committed the remaining functionality from #19 as 3b066de6c0, omitting entry_size and the sysviews smoke test, refining wording and test ordering, and bumping the catalog version; he announced the landing in #24, and the commit credited Tristan as author.
- Tristan resumed the deferred sizing work in #25, using pgstat_get_entry_len() to expose statistics payload size because shared_size neither covered all overhead nor supplied useful values for every built-in kind.
- Sami requested clearer limits on memory accounting in #26; Tristan added a warning in #30, then Sami supplied #31 with that warning incorporated into the column description, rejected a separate shared_size column, and removed the premature registry reference, receiving Tristan's approval in #32.
- For actual allocation monitoring, Michael proposed using GetNamedDSHash() and pg_dsm_registry_allocations in #28, and Sami connected that idea to dedicated per-kind allocations in #29, while keeping payload-size metadata separate from total memory accounting.
- Michael raised initialization and single-user-mode concerns about switching to the DSM registry in #34; Sami reported a passing proof of concept, successful single-user testing and roughly 35–40 microseconds of extra connection-startup cost in #35.
- Michael and Sami favored retaining the existing optimization while exploring registry-lock improvements in #36 and #37; at the thread's close in #38, Michael remained open to registry integration if the overhead disappeared, while the base view had landed and the entry_size follow-up in #31 remained uncommitted in the supplied record.