Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a9701a1

Browse files
committed
In pg_upgrade, issue proper error message when we can't open PG_VERSION.
Backpatch to 9.2.
1 parent a80889a commit a9701a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/server.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ get_major_server_version(ClusterInfo *cluster)
149149
snprintf(ver_filename, sizeof(ver_filename), "%s/PG_VERSION",
150150
cluster->pgdata);
151151
if ((version_fd = fopen(ver_filename, "r")) == NULL)
152-
return 0;
152+
pg_log(PG_FATAL, "could not open version file: %s\n", ver_filename);
153153

154154
if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 ||
155155
sscanf(cluster->major_version_str, "%d.%d", &integer_version,

0 commit comments

Comments
 (0)