Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteeaf689

Browse files
vacuumdb: Add missing PQfinish() calls to vacuum_one_database().
A few of the version checks in vacuum_one_database() do not callPQfinish() before exiting. This precedent was unintentionallyestablished in commit00d1e88, and while it's probably not tooproblematic, it seems better to properly close the connection.Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/Z6JAwqN1I8ljTuXp%40nathanBackpatch-through: 13
1 parentd7260f9 commiteeaf689

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/bin/scripts/vacuumdb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,20 +514,23 @@ vacuum_one_database(ConnParams *cparams,
514514

515515
if (vacopts->min_xid_age!=0&&PQserverVersion(conn)<90600)
516516
{
517+
PQfinish(conn);
517518
pg_log_error("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
518519
"--min-xid-age","9.6");
519520
exit(1);
520521
}
521522

522523
if (vacopts->min_mxid_age!=0&&PQserverVersion(conn)<90600)
523524
{
525+
PQfinish(conn);
524526
pg_log_error("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
525527
"--min-mxid-age","9.6");
526528
exit(1);
527529
}
528530

529531
if (vacopts->parallel_workers >=0&&PQserverVersion(conn)<130000)
530532
{
533+
PQfinish(conn);
531534
pg_log_error("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
532535
"--parallel","13");
533536
exit(1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp