vacuumdb: Fix --missing-stats-only for partitioned indexes.
Nathan Bossart <nathan@postgresql.org>
vacuumdb: Fix --missing-stats-only for partitioned indexes. The current form of the catalog query picks up partitioned tables with expression indexes that lack statistics. However, since such indexes never have statistics, there's no point in analyzing them. To fix, adjust the relevant part of the query to skip partitioned tables with expression indexes. While at it, remove the nearby stainherit check; entries for index expressions always have stainherit = false. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Discussion: https://postgr.es/m/CA%2Bfm-RPE1tEc6CUUPDyRbYTz9tF5Kw47nnk-Zq%3DyYvanbsxyCQ%40mail.gmail.com Backpatch-through: 18
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/scripts/t/100_vacuumdb.pl | modified | +1 −0 |
| src/bin/scripts/vacuuming.c | modified | +2 −2 |
Discussion
- Fix --missing-stats-only false positive for partitioned expression indexes 14 messages · 2026-06-16 → 2026-06-17