-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5517~1
head repository: postgresql-cfbot/postgresql
compare: cf/5517
- 6 commits
- 17 files changed
- 3 contributors
Commits on Aug 1, 2025
-
Refactor output format of pg_ndistinct and add working input function.
The existing format of pg_ndistinct uses a single-object JSON structure where each key is itself a comma-separated list of attnums. While this is a very compact format, it's confusing to read and is difficult to manipulate values within the object. This wasn't a concern until statistics import functions were introduced, enabling users to inject hypothetical statistics into an object to observe their effect on the query planner. The new format is an array of objects, each object must have the keys "attributes", which must contain an array of attnums, and "ndistinct", which must be an integer. This is a quirk because the underlying internal storage is a double, but the value stored was always an integer. The change in format is adequately described from the changes to src/test/regress/expected/stats_ext.out so description here is redundant.
Configuration menu - View commit details
-
Copy full SHA for 6e5f490 - Browse repository at this point
Copy the full SHA 6e5f490View commit details -
Refactor output format of pg_dependencies and add working input funct…
…ion. The existing format of pg_dependencies uses a single-object JSON structure where each key is itself a comma-separated list of attnums. While this is a very compact format, it's confusing to read and is difficult to manipulate values within the object. This wasn't a concern until statistics import functions were introduced, enabling users to inject hypothetical statistics into an object to observe their effect on the query planner. The new format is an array of objects, each object must have the keys "attributes", which must contain an array of attnums, "dependency", which must be an integer, and "degree", which must be a float. The change in format is adequately described from the changes to src/test/regress/expected/stats_ext.out so description here is redundant.
Configuration menu - View commit details
-
Copy full SHA for cffd1b4 - Browse repository at this point
Copy the full SHA cffd1b4View commit details -
Expose attribute statistics functions for use in extended_stats.
Many of the operations of attribute stats have analogous operations in extended stats. * get_attr_stat_type() * init_empty_stats_tuple() * text_to_stavalues() * get_elem_stat_type()
Corey Huinker authored and Commitfest Bot committedAug 1, 2025 Configuration menu - View commit details
-
Copy full SHA for c0ba4bf - Browse repository at this point
Copy the full SHA c0ba4bfView commit details -
Add extended statistics support functions.
Add pg_restore_extended_stats() and pg_clear_extended_stats(). These functions closely mirror their relation and attribute counterparts, but for extended statistics (i.e. CREATE STATISTICS) objects.
Configuration menu - View commit details
-
Copy full SHA for 907077c - Browse repository at this point
Copy the full SHA 907077cView commit details -
Include Extended Statistics in pg_dump.
Incorporate the new pg_restore_extended_stats() function into pg_dump. This detects the existence of extended statistics statistics (i.e. pg_statistic_ext_data rows). This handles many of the changes that have happened to extended statistic statistics over the various versions, including: * Format change for pg_ndistinct and pg_dependencies in current development version. Earlier versions have the format translated via the pg_dump SQL statement. * Inherited extended statistics were introduced in v15. * Expressions were introduced to extended statistics in v14. * MCV extended statistics were introduced in v13. * pg_statistic_ext_data and pg_stats_ext introduced in v12, prior to that ndstinct and depdendencies data (the only kind of stats that existed were directly on pg_statistic_ext. * Extended Statistics were introduced in v10, so there is no support for prior versions necessary.
Configuration menu - View commit details
-
Copy full SHA for 8344a2a - Browse repository at this point
Copy the full SHA 8344a2aView commit details -
[CF 5517] v4 - Extended Statistics set/restore/clear functions
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5517 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CADkLM=daHJhUf-sO1iD=UTaymbBVEgEW4Sxm8PtHWWDEGWW9jQ@mail.gmail.com Author(s): Corey Huinker
Commitfest Bot committedAug 1, 2025 Configuration menu - View commit details
-
Copy full SHA for 64b0e9b - Browse repository at this point
Copy the full SHA 64b0e9bView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5517~1...cf/5517