vacuumdb: Add option for analyzing only relations missing stats.
Nathan Bossart <nathan@postgresql.org>
Author:
Nathan Bossart <nathan@postgresql.org>
Committer:
John Naylor <john.naylor@postgresql.org>
Date: 2025-03-07T03:17:35Z
Releases:
18.0
vacuumdb: Add option for analyzing only relations missing stats. This commit adds a new --missing-only option that can be used in conjunction with --analyze-only and --analyze-in-stages. When this option is specified, vacuumdb will generate ANALYZE commands for a relation if it is missing any statistics it should ordinarily have. For example, if a table has statistics for one column but not another, we will analyze the whole table. A similar principle applies to extended statistics, expression indexes, and table inheritance. Co-authored-by: Corey Huinker <corey.huinker@gmail.com> Reviewed-by: TODO Discussion: https://postgr.es/m/Z5O1bpcwDrMgyrYy%40nathan
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/vacuumdb.sgml | modified | +16 −0 |
| src/bin/scripts/t/102_vacuumdb_stages.pl | modified | +60 −0 |
| src/bin/scripts/vacuumdb.c | modified | +92 −0 |
| 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