vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: vacuumdb --analyze-only does not need to issue VACUUM (ONLY_DATABASE_STATS) ?
Date: 2025-08-08 06:57:36
Message-ID: CAHGQGwEqHGa-k=wbRMucUVihHVXk4NQkK94GNN=ym9cQ5HBSHg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that vacuumdb --analyze-only currently issues
VACUUM (ONLY_DATABASE_STATS). Is this actually needed?
BTW, vacuumdb does not run this command when --analyze-in-stages
is specified.

The attached patch modifies vacuumdb to skip
VACUUM (ONLY_DATABASE_STATS) when --analyze-only is used

Regards,

--
Fujii Masao

Attachment Content-Type Size
v1-0001-vacuumdb-Skip-VACUUM-ONLY_DATABASE_STATS-with-ana.patch application/octet-stream 927 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2025-08-08 07:08:49 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Alexander Korotkov 2025-08-08 06:54:18 Re: Implement waiting for wal lsn replay: reloaded