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

Commit8c2dd21

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 parent061994f commit8c2dd21

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/bin/scripts/vacuumdb.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,16 +461,25 @@ vacuum_one_database(ConnParams *cparams,
461461
}
462462

463463
if (vacopts->min_xid_age!=0&&PQserverVersion(conn)<90600)
464+
{
465+
PQfinish(conn);
464466
pg_fatal("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
465467
"--min-xid-age","9.6");
468+
}
466469

467470
if (vacopts->min_mxid_age!=0&&PQserverVersion(conn)<90600)
471+
{
472+
PQfinish(conn);
468473
pg_fatal("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
469474
"--min-mxid-age","9.6");
475+
}
470476

471477
if (vacopts->parallel_workers >=0&&PQserverVersion(conn)<130000)
478+
{
479+
PQfinish(conn);
472480
pg_fatal("cannot use the \"%s\" option on server versions older than PostgreSQL %s",
473481
"--parallel","13");
482+
}
474483

475484
if (!quiet)
476485
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp