model-writtenrun 9363 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dean Rasheed opened the thread by identifying two ways multivariate MCV statistics could expose protected values: public catalog access and planner execution of leaky operators; he attached privilege and leakproofness checks for the planner path in #1.
- Tomas Vondra addressed catalog access with a security-barrier pg_stats_ext view that translated object names, exposed dependency and distinct-count statistics, and hid MCV values when column privileges were missing in #2.
- Dean revised the view to hide entire statistics rows without sufficient privileges, expand MCV values into readable arrays, order attribute names, and expose statistics identity in #3.
- Andres Freund challenged preserving old psql compatibility in #5, but Dean identified a separate pg_dump requirement: object definitions must remain discoverable even when row-level security hides statistical data in #7.
- Tom Lane proposed separating statistics definitions from collected data in #8 and argued for making the change in PostgreSQL 12, accepting a post-beta catalog-version bump rather than postponing it to the next major release in #14.
- Dean supplied the catalog split in #16, maintaining a one-to-one relationship by creating and deleting definition and data tuples together, and reported that regression tests passed.
- Tom proposed storing each statistics kind in a separate row with a common tagged data type in #17 and #18, while Dean and Tomas questioned the added lookup, conversion, and type-checking complexity in #20, #22, and #23.
- After the discussion, Tomas returned with the rebased split, documentation, and adapted view together in #28, proposing that this implementation land while any generic-storage redesign remain a separate possible improvement.
- Dean found that statistics_owner incorrectly used the table owner and suggested JSON storage as another alternative in #29; John Naylor found copied catalog references and suggested SQL style improvements in #30.
- Tomas incorporated the owner correction, documentation fixes, and stxd-prefixed data fields into two patches in #31, while declining JSONB storage because arbitrary data types would require text conversions and retaining direct-catalog examples because he found them more readable.
- Tomas committed the catalog component of #31 as 6cbfb784c3 with a catalog-version bump, and the view component as aa087ec64f with additional view documentation and another version bump, announcing both in #32.
- Dean noticed that the original planner-security patch had been overlooked and committed #1 unchanged apart from rebasing as d7f8d26d9f, announcing the remaining fix in #33.
- Tomas acknowledged the oversight in the final message #34; all submitted security-fix components had landed, while the alternative generic and JSON storage designs remained unimplemented.