Re: vacuumdb: add --dry-run

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

>
> > 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.
> >
> > Would that be preferable to skipping the creation of extra connections
> for parallel workers? I can see it both ways. On the one hand we want to
> give as true a reflection of "what would happen with these options", and on
> the other hand one could view the creation of extra workers as "real" vs a
> dry run.
> >
> >
>
>
Now with zero hangs and some test cases. I didn't create a function (yet)
as it seemed trivial.

Attachment Content-Type Size
v2-0001-Add-dry-run-to-vacuumdb.patch text/x-patch 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-11-19 22:23:53 Re: PRI?64 vs Visual Studio (2022)
Previous Message Peter Smith 2025-11-19 22:18:59 Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis