From: Nathan Bossart <nathandbossart@gmail.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: vacuumdb: add --dry-run
Date: Mon, 10 Nov 2025 15:19:23 -0600
Message-ID: <aRJW2_Yy9ALMkZUa@nathan> (raw)
In-Reply-To: <CADkLM=ckHkX7Of5SrK7g0LokPUwJ=kk8JU1GXGF5pZ1eBVr0=Q@mail.gmail.com>
References: <CADkLM=ckHkX7Of5SrK7g0LokPUwJ=kk8JU1GXGF5pZ1eBVr0=Q@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, corey.huinker@gmail.com
Subject: Re: vacuumdb: add --dry-run
In-Reply-To: <aRJW2_Yy9ALMkZUa@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox