agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes.
Date: Wed, 17 Jun 2026 14:19:05 +0000
Message-ID: <E1wZr6f-000jLg-1i@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)

Message-ID: <E1wZr6f-000jLg-1i@gemulon.postgresql.org>
Permalink:  ../E1wZr6f-000jLg-1i@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wZr6f-000jLg-1i@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: vacuumdb: Fix --missing-stats-only for partitioned indexes.
  In-Reply-To: <E1wZr6f-000jLg-1i@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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