-
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
- 8 commits
- 26 files changed
- 3 contributors
Commits on Nov 12, 2025
-
Refactor output format of pg_ndistinct.
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 described from the changes to src/test/regress/expected/stats_ext.out.
Configuration menu - View commit details
-
Copy full SHA for a839ad8 - Browse repository at this point
Copy the full SHA a839ad8View commit details -
Refactor output format of pg_dependencies.
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 8a4d7c0 - Browse repository at this point
Copy the full SHA 8a4d7c0View commit details -
Add working input function for pg_ndistinct.
This will consume the format that was established when the output function for pg_ndistinct was recently changed. This will be needed for importing extended statistics.
Configuration menu - View commit details
-
Copy full SHA for 29c6b89 - Browse repository at this point
Copy the full SHA 29c6b89View commit details -
Add working input function for pg_dependencies.
This will consume the format that was established when the output function for pg_dependencies was recently changed. This will be needed for importing extended statistics.
Configuration menu - View commit details
-
Copy full SHA for ead36b1 - Browse repository at this point
Copy the full SHA ead36b1View 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() renamed to statatt_get_type() * init_empty_stats_tuple() renamed to statatt_init_empty_tuple() * text_to_stavalues() * get_elem_stat_type() renamed to statatt_get_elem_type() Also, add comments explaining the function argument index enums, and the arrays that are indexed by those enums.
Configuration menu - View commit details
-
Copy full SHA for c8ead5e - Browse repository at this point
Copy the full SHA c8ead5eView 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 77c4e37 - Browse repository at this point
Copy the full SHA 77c4e37View 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 df2ccde - Browse repository at this point
Copy the full SHA df2ccdeView commit details -
[CF 5517] v12 - 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=c8-U4GLMw5VdeDdfp1ae6BW=PCfEQqAky04iZMbckCFw@mail.gmail.com Author(s): Corey Huinker
Commitfest Bot committedNov 12, 2025 Configuration menu - View commit details
-
Copy full SHA for 96f9c01 - Browse repository at this point
Copy the full SHA 96f9c01View 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