vacuumdb: Add missing PQfinish() calls to vacuum_one_database().
authorNathan Bossart <nathan@postgresql.org>
Tue, 4 Feb 2025 19:26:57 +0000 (13:26 -0600)
committerNathan Bossart <nathan@postgresql.org>
Tue, 4 Feb 2025 19:26:57 +0000 (13:26 -0600)
commiteeaf6891be48ac2940361717525c277a02c97e63
tree6015c6ca721647d5be792e50cf90f5a54732847f
parentd7260f92adea66791b027ad46b44b2cb7d77b555
vacuumdb: Add missing PQfinish() calls to vacuum_one_database().

A few of the version checks in vacuum_one_database() do not call
PQfinish() before exiting.  This precedent was unintentionally
established in commit 00d1e88d36, and while it's probably not too
problematic, it seems better to properly close the connection.

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/Z6JAwqN1I8ljTuXp%40nathan
Backpatch-through: 13
src/bin/scripts/vacuumdb.c