agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes.
2+ messages / 1 participants
[nested] [flat]

* pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes.
@ 2026-06-17 14:19 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2026-06-17 14:19 UTC (permalink / raw)
  To: pgsql-committers@lists.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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d2cea63065b3684d2d1eba4c3f4dea68bf1b373c

Modified Files
--------------
src/bin/scripts/t/100_vacuumdb.pl | 1 +
src/bin/scripts/vacuuming.c       | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes.
@ 2026-06-17 14:19 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2026-06-17 14:19 UTC (permalink / raw)
  To: pgsql-committers@lists.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

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7e085aabd5759c73d25556a5963866d5beaea5cd

Modified Files
--------------
src/bin/scripts/t/100_vacuumdb.pl | 1 +
src/bin/scripts/vacuumdb.c        | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-06-17 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 14:19 pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes. Nathan Bossart <nathan@postgresql.org>
2026-06-17 14:19 pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes. Nathan Bossart <nathan@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox