vacuumdb: Add option for analyzing only relations missing stats.
Nathan Bossart <nathan@postgresql.org>
vacuumdb: Add option for analyzing only relations missing stats. This commit adds a new --missing-stats-only option that can be used with --analyze-only or --analyze-in-stages. When this option is specified, vacuumdb will analyze a relation if it lacks any statistics for a column, expression index, or extended statistics object. This new option is primarily intended for use after pg_upgrade (since it can now retain most optimizer statistics), but it might be useful in other situations, too. Author: Corey Huinker <corey.huinker@gmail.com> Co-authored-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: John Naylor <johncnaylorls@gmail.com> Discussion: https://postgr.es/m/Z5O1bpcwDrMgyrYy%40nathan
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/vacuumdb.sgml | modified | +16 −0 |
| src/bin/scripts/t/100_vacuumdb.pl | modified | +60 −0 |
| src/bin/scripts/vacuumdb.c | modified | +112 −2 |
| src/test/perl/PostgreSQL/Test/Cluster.pm | modified | +27 −0 |
Documentation touched
Discussion
- vacuumdb changes for stats import/export 36 messages · 2025-01-24 → 2025-07-30