Content-Length: 268871 | pFad | http://github.com/postgrespro/postgres_cluster/commit/4109bb5de4998b9301ea2ac18c9d6dfb0b4f900b

20 Include error code in message from pg_upgrade · postgrespro/postgres_cluster@4109bb5 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/4109bb5de4998b9301ea2ac18c9d6dfb0b4f900b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy