Re: vacuumdb: add --dry-run

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Kirill Reshke <reshkekirill@gmail.com>, Chao Li <li.evan.chao@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-12-05T20:47:38Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add ParallelSlotSetIdle().

  2. vacuumdb: Add --dry-run.

  3. vacuumdb: Move some variables to the vacuumingOptions struct.

  4. Log a note at program start when running in dry-run mode

On Fri, Dec 05, 2025 at 03:34:12PM -0500, Corey Huinker wrote:
>> I guess we could probably remove the top-level "Executing in dry-run mode"
>> message, provided we say the same thing in the per-database message.
>> However, the latter can be turned off with --quiet.  Maybe we should
>> consider disallowing --quiet and --dry-run.
> 
> --quiet does appear to be the sworn enemy of "tell me what you would have
> done if you were really gonna do it". So yeah, disallowing that combination
> would make sense.

On the other hand, --quiet is handy if you're trying to save the output of
--dry-run elsewhere to run later.  (Of course, if you use --all, that
output won't be tremendously useful.)

-- 
nathan