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

Commit9be95ef

Browse files
committed
Fix bogus logic for checking executables' versions within pg_upgrade.
Somebody messed up a refactoring here. As it stood, we'd check pg_ctl's--version output twice for each cluster. Worse, the first check for thenew cluster's version happened before we'd done any validate_exec checksthere, breaking the check ordering the code intended.A. AkentevaDiscussion:https://postgr.es/m/f9266a85d918a3cf3a386b5148aee666@postgrespro.ru
1 parent20d9ada commit9be95ef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/bin/pg_upgrade/exec.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,11 @@ check_bin_dir(ClusterInfo *cluster)
382382
validate_exec(cluster->bindir,"pg_ctl");
383383

384384
/*
385-
* Fetch the binaryversions after checking for the existence of pg_ctl,
386-
*this gives a correct error if the binary useditselffor the version
387-
* fetching is broken.
385+
* Fetch the binaryversion after checking for the existence of pg_ctl.
386+
*This way we report a useful error if thepg_ctlbinary used for version
387+
* fetching ismissing/broken.
388388
*/
389-
get_bin_version(&old_cluster);
390-
get_bin_version(&new_cluster);
389+
get_bin_version(cluster);
391390

392391
/* pg_resetxlog has been renamed to pg_resetwal in version 10 */
393392
if (GET_MAJOR_VERSION(cluster->bin_version)<1000)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp