Re: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Mircea Cadariu <cadariu.mircea@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-09-16T15:36:45Z
Lists: pgsql-hackers
Attachments
- v2-0001-vacuumdb-Do-not-run-VACUUM-ONLY_DATABASE_STATS-wh.patch (application/octet-stream) patch v2-0001
On Tue, Sep 16, 2025 at 10:06 PM Mircea Cadariu <cadariu.mircea@gmail.com> wrote: > > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation: tested, passed > > Hi, > > I tested the patch with log_statement = 'all' and I confirm I do not see the VACUUM log line anymore. Thanks for the review and testing! > You could consider adding the following representative test in src/bin/scripts/t/100_vacuumdb.pl: > $node->issues_sql_unlike( > [ 'vacuumdb', '--analyze-only', 'postgres' ], > qr/statement: VACUUM.*;/, > 'vacuumdb --analyze-only skips vacuum'); +1. I've added that test to the patch. Attached is the updated version of the patch. Regards, -- Fujii Masao
Commits
-
vacuumdb: Do not run VACUUM (ONLY_DATABASE_STATS) when --analyze-only.
- 879c492480d0 19 (unreleased) landed