Re: vacuumdb: add --dry-run

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-12-04T23:40:42Z
Lists: pgsql-hackers
>
> Yeah, I'm finding myself liking the idea of moving all of these things into
> vacuumingOptions so that we don't have to cart around so many bool
> arguments.  Here's a new patch set that does it this way.
>

+1. Every time I modify a global variable, I hear my high school CS teacher
scolding me.


> The remaining question in my mind is where we should let the user know that
> we're in dry-run mode.  The three options I see are 1) at the beginning of
> vacuumdb execution, 2) in the !quiet block for each database, and 3) in
> each command (via a comment).  In v5, I've added a message to all three,
> but I'm eager to hear what folks think.
>

Looking at them, I think they're all good. I think #3 is a must-have in all
circumstances. I wouldn't be mad if we removed #1 or #2, but I see the
value in each of them.