From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: vacuumdb: Do not run VACUUM (ONLY_DATABASE_STATS) when --analyze
Date: Wed, 24 Sep 2025 16:39:39 +0000
Message-ID: <E1v1SWo-002LFL-2W@gemulon.postgresql.org> (raw)
vacuumdb: Do not run VACUUM (ONLY_DATABASE_STATS) when --analyze-only.
Previously, vacuumdb --analyze-only issued VACUUM (ONLY_DATABASE_STATS)
at the end. Since --analyze-only is meant to update optimizer statistics only,
this extra VACUUM command is unnecessary.
This commit prevents vacuumdb --analyze-only from running that redundant
VACUUM command.
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Mircea Cadariu <cadariu.mircea@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwEqHGa-k=wbRMucUVihHVXk4NQkK94GNN=ym9cQ5HBSHg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/879c492480d0e9ad8155c4269f95c5e8add41901
Modified Files
--------------
src/bin/scripts/t/100_vacuumdb.pl | 6 ++++++
src/bin/scripts/vacuumdb.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
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: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: vacuumdb: Do not run VACUUM (ONLY_DATABASE_STATS) when --analyze
In-Reply-To: <E1v1SWo-002LFL-2W@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