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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy