Re: vacuumdb: add --dry-run

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: vacuumdb: add --dry-run
Date: 2025-11-19 23:55:20
Message-ID: CADkLM=dwBjL5fK-Dq_2qhAuHsHPab_Kt+R7KZTA9w_X0K6bENg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 19, 2025 at 5:44 PM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> On Wed, Nov 19, 2025 at 05:23:48PM -0500, Corey Huinker wrote:
> > Now with zero hangs and some test cases. I didn't create a function (yet)
> > as it seemed trivial.
>
> I still think it could be worth moving the dry-run code into
> run_vacuum_command() (which might entail moving the calls to
> ParallelSlotSetHandler() there, too). We can probably piggy-back on the
> "if (echo)" branch in that function.
>

We _could_ get away with moving ParallelSlotGetIdle() in there too. The
only catch would be that we'd have to refactor prepare_vacuum_command() to
take a serverVersionNumber parameter instead of the whole connection.
Thoughts?

>
> Also, we can probably skip the executeCommand() calls for
> --analyze-in-stages.
>

+1

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-11-20 00:01:39 Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis
Previous Message Masahiko Sawada 2025-11-19 23:32:46 Re: postgres_fdw: Use COPY to speed up batch inserts