Statistics import and export
Dumping, restoring and importing planner statistics: pg_restore_*_stats functions, pg_dump/pg_upgrade statistics and postgres_fdw remote stats import.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · shipped · improved · moderate · 38 commits · +12.4k / -2k lines
- PostgreSQL 18 · shipped · new · major · 43 commits · +10.4k / -4.4k lines
- PostgreSQL 17 · shipped · new · major · 1 commit · +5 / -1 lines
Threads
- postgres_fdw: statistics import can silently fall back to sampling across encodings
- BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
- BUG #19857: Stats restore rejects empty arrays, losing range and array stats
- Update comments in functions for statistics import in postgres_fdw.c
- [PG19] pg_dump marks extended statistics of pre-v15 partitioned tables as non-inherited
- BUG #19845: pg_dump extended stats break when column numbers change on restore
- Assertion failure when importing expression statistics with nested JSON values
- BUG #19814: pg_restore_attribute_stats: MCV accepted without eq operator; ANALYZE range slot rejected
- BUG #19821: pg_restore_attribute_stats() accepts an unsorted scalar histogram_bounds, producing badly wrong row
- BUG #19820: ANALYZE can store empty (0-dimensional) stavalues that the statistics import functions refuse to res
- [PG19] pg_dump --statistics restores extended statistics by attribute number
- Several issues with postgres_fdw stats import
- BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange
- Import Statistics in postgres_fdw before resorting to sampling.
- [PG19][PATCH] Make postgres_fdw statistics import atomic
- pg_restore_attribute_stats accepts and persists null_frac=NaN
- Further cleanup related to statistics import support in postgres_fdw
- pg_restore_attribute_stats accepts an unsorted range-length histogram
- Remove fcinfo from statistics update internal functions
- [PATCH] Test coverage for pg_clear_attribute_stats() null arguments
- Add starelid, attnum to pg_stats and leverage this in pg_dump
- pg_restore_attribute_stats() accepts non-finite values
- BUG #19629: pg_restore_relation_stats reports XX000 instead of proper SQLSTATE for input validation errors
- Fix signed/unsigned integer handling in pg_restore_relation_stats()
- use of SPI by postgresImportForeignStatistics
- CREATE INDEX vs. TOAST table stats
- Wrong argument name in error message from attribute_stats functions
- Reject ill-formed range bounds histograms in pg_restore_attribute_stats()
- postgres_fdw: fix cumulative stats after imported foreign-table stats
- statatt_build_stavalues->LOCAL_FCINFO wrong number
- Can we use Statistics Import and Export feature to perforamance testing?
- BUG #19529: Documentation appears inconsistent with pg_dump --statistics behavior for CREATE STATISTICS objects
- Fix --missing-stats-only false positive for partitioned expression indexes
- Optional skipping of unchanged relations during ANALYZE?
- pg_restore handles extended statistics inconsistently with statistics data
- [PATCH] pg_restore_extended_stats() can store an MCV list that cannot be read back
- Dead reference to schema_only_with_statistics in pg_dump TAP code
- postgres_fdw: possible overlooked NAMEDATALEN comparison in stats import
- Dump statistic issue with index on expressions
- Fix small issues of pg_restore_extended_stats()
- doc: fix pg_restore_extended_stats() example syntax
- postgres_fdw: restore_stats uses current user's mapping instead of table owner's during ANALYZE
- Fix array-element quoting in postgres_fdw import statistics
- [PATCH] Fix column name escaping in postgres_fdw stats import
- Bug: trailing comma syntax error in postgres_fdw fetch_attstats()
- Fix typo in import_pg_statistic() comment
- [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version
- Add expressions to pg_restore_extended_stats()
- [PATCH] Fix improper tuple deallocation in import_pg_statist()
- Re: [PATCH] Fix improper tuple deallocation in import_pg_statist()
- Extended Statistics set/restore/clear functions.
- regarding statistics retaining with 18 Upgrade
- vacuumdb --missing-stats-only and permission issue
- pg_dump --with-* options
- vacuumdb changes for stats import/export
- pg_dumpall dumps global objects with --statistics-only or --no-schema
- Allow pg_dump --statistics-only to dump foreign table statistics?
- BUG #18952: pg_restore --help and document have strange description: Dump something
- Add missing references to database object statistics manipulation functions in documentation
- Statistics Import and Export
- BUG #18923: pg_dump 18beta1 fails to process complex table names
- Remove unnecessary "lmgr.h" in stat_utils.c
- not not - pgupgrade.sgml
- pgsql: Update guidance for running vacuumdb after pg_upgrade.
- statistics import and export: another difference in dump/restore
- Statistics import and export: difference in statistics of materialized view dumped
- Statistics Import and Export commit related issue.
- Improve error messages for database object stats manipulation functions during recovery
- Inconsistent use of relpages = -1
- Importing Extended Statistics
- Support for dumping extended statistics