提交 a9701a1d 编写于 作者: B Bruce Momjian

In pg_upgrade, issue proper error message when we can't open PG_VERSION.

Backpatch to 9.2.
上级 a80889a7
......@@ -149,7 +149,7 @@ get_major_server_version(ClusterInfo *cluster)
snprintf(ver_filename, sizeof(ver_filename), "%s/PG_VERSION",
cluster->pgdata);
if ((version_fd = fopen(ver_filename, "r")) == NULL)
return 0;
pg_log(PG_FATAL, "could not open version file: %s\n", ver_filename);
if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 ||
sscanf(cluster->major_version_str, "%d.%d", &integer_version,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册