public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: [email protected]
Subject: pgsql: vacuumdb: Add option for analyzing only relations missing stats.
Date: Tue, 18 Mar 2025 21:33:42 +0000
Message-ID: <[email protected]> (raw)

vacuumdb: Add option for analyzing only relations missing stats.

This commit adds a new --missing-stats-only option that can be used
with --analyze-only or --analyze-in-stages.  When this option is
specified, vacuumdb will analyze a relation if it lacks any
statistics for a column, expression index, or extended statistics
object.  This new option is primarily intended for use after
pg_upgrade (since it can now retain most optimizer statistics), but
it might be useful in other situations, too.

Author: Corey Huinker <[email protected]>
Co-authored-by: Nathan Bossart <[email protected]>
Reviewed-by: John Naylor <[email protected]>
Discussion: https://postgr.es/m/Z5O1bpcwDrMgyrYy%40nathan

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/ref/vacuumdb.sgml           |  16 +++++
src/bin/scripts/t/100_vacuumdb.pl        |  60 ++++++++++++++++
src/bin/scripts/vacuumdb.c               | 114 ++++++++++++++++++++++++++++++-
src/test/perl/PostgreSQL/Test/Cluster.pm |  27 ++++++++
4 files changed, 215 insertions(+), 2 deletions(-)



view thread (3+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: vacuumdb: Add option for analyzing only relations missing stats.
  In-Reply-To: <[email protected]>

* 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