Skip to content

Commit 4109bb5

Browse files
committed
Include error code in message from pg_upgrade
In passing, also quote the filename in one message where it wasn't. Author: Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/87pne2w98h.fsf@wibble.ilmari.org
1 parent 59f9cd9 commit 4109bb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_upgrade/server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ get_major_server_version(ClusterInfo *cluster)
164164
snprintf(ver_filename, sizeof(ver_filename), "%s/PG_VERSION",
165165
cluster->pgdata);
166166
if ((version_fd = fopen(ver_filename, "r")) == NULL)
167-
pg_fatal("could not open version file: %s\n", ver_filename);
167+
pg_fatal("could not open version file \"%s\": %m\n", ver_filename);
168168

169169
if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 ||
170170
sscanf(cluster->major_version_str, "%d.%d", &v1, &v2) < 1)
171-
pg_fatal("could not parse PG_VERSION file from %s\n", cluster->pgdata);
171+
pg_fatal("could not parse PG_VERSION file from \"%s\"\n", cluster->pgdata);
172172

173173
fclose(version_fd);
174174

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