pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: vacuumdb: Fix --missing-stats-only with virtual generated column
Date: Fri, 22 Aug 2025 16:12:09 +0000
Message-ID: <E1upUN6-0019eY-2I@gemulon.postgresql.org> (raw)

vacuumdb: Fix --missing-stats-only with virtual generated columns.

Statistics aren't created for virtual generated columns, so
"vacuumdb --missing-stats-only" always chooses to analyze tables
that have them.  To fix, modify vacuumdb's query for retrieving
relations that are missing statistics to exclude those columns.

Oversight in commit edba754f05.

Author: Yugo Nagata <nagata@sraoss.co.jp>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/20250820104226.8ba51e43164cd590b863ce41%40sraoss.co.jp
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8c0c8686374495815c2c970e8652228c5aac4495

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



view thread (2+ messages)

Message-ID: <E1upUN6-0019eY-2I@gemulon.postgresql.org>
Permalink:  ../E1upUN6-0019eY-2I@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1upUN6-0019eY-2I@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 with virtual generated column
  In-Reply-To: <E1upUN6-0019eY-2I@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox