vacuumdb: Move some variables to the vacuumingOptions struct.
authorNathan Bossart <nathan@postgresql.org>
Tue, 9 Dec 2025 19:34:22 +0000 (13:34 -0600)
committerNathan Bossart <nathan@postgresql.org>
Tue, 9 Dec 2025 19:34:22 +0000 (13:34 -0600)
commitcf1450e57799afb683ccbfc482c6f1b5827c81e7
tree4a3787764da380f756d7e909418da3ef367bb499
parentab40db3852dfa093b64c9266dd372fee414e993f
vacuumdb: Move some variables to the vacuumingOptions struct.

Presently, the "echo" and "quiet" variables are carted around to
various functions, which is a bit tedious.  To simplify things,
this commit moves them into the vacuumingOptions struct and removes
the related function parameters.  While at it, remove some
redundant initialization code in vacuumdb's main() function.

This is preparatory work for a follow-up commit that will add a
--dry-run option to vacuumdb.

Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CADkLM%3DckHkX7Of5SrK7g0LokPUwJ%3Dkk8JU1GXGF5pZ1eBVr0%3DQ%40mail.gmail.com
src/bin/scripts/vacuumdb.c
src/bin/scripts/vacuuming.c
src/bin/scripts/vacuuming.h