Re: vacuumdb: add --dry-run

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: vacuumdb: add --dry-run
Date: 2025-11-10 21:19:23
Message-ID: aRJW2_Yy9ALMkZUa@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 10, 2025 at 02:44:41PM -0500, Corey Huinker wrote:
> This is a small patch to add a new option to vacuumdb to answer the
> question "what commands will actually be run by this combination of
> command-line switches against this database?" without actually running the
> commands.

My attempts to test this all got stuck in wait_on_slots(). I haven't
looked too closely, but I suspect the issue is that the socket never
becomes readable because we don't send a query. If I set free_slot->inUse
to false before printing the command, it no longer hangs. We probably want
to create a function in parallel_slot.c to mark slots that we don't intend
to give a query as idle.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-11-10 21:28:02 Re: pgsql: Drop unnamed portal immediately after execution to completion
Previous Message Robert Haas 2025-11-10 21:13:24 Re: pgsql: Drop unnamed portal immediately after execution to completion