]> git.ipfire.org Git - thirdparty/postgresql.git/commit
vacuumdb: Fix --missing-stats-only for partitioned indexes.
authorNathan Bossart <nathan@postgresql.org>
Wed, 17 Jun 2026 14:18:39 +0000 (09:18 -0500)
committerNathan Bossart <nathan@postgresql.org>
Wed, 17 Jun 2026 14:18:39 +0000 (09:18 -0500)
commit7e085aabd5759c73d25556a5963866d5beaea5cd
treeb62dd3d4f6c6e9f2da493c83e3e2b9f5b309a94f
parent13f940b4b56f38414a0dbd820f65c8e74f55d466
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
src/bin/scripts/t/100_vacuumdb.pl
src/bin/scripts/vacuumdb.c