postgres.git / summary / log / commit / refs

commit    2247a1ea5fabafc11a6deab1c6fe822c9df45bb1
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Thu Mar 19 19:20:55 2020 +0000
First released in: 13.0, 9.5.22, 9.6.18, 10.13, 11.8, 12.3

    pg_upgrade:  make get_major_server_version() err msg consistent
    
    This patch fixes the error message in get_major_server_version() to be
    "could not parse version file", and uses the full file path name, rather
    than just the data directory path.
    
    Also, commit 4109bb5de4 added the cause of the failure to the  "could
    not open" error message, and improved quoting.  This patch backpatches
    the "could not open" cause to PG 12, where it was first widely used, and
    backpatches the quoting fix in that patch to all supported releases.
    
    Reported-by: Tom Lane
    
    Discussion: https://postgr.es/m/87pne2w98h.fsf@wibble.ilmari.org
    
    Author: Dagfinn Ilmari Mannsåker
    
    Backpatch-through: 9.5


src/bin/pg_upgrade/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index be604d33514..f669bb4e8a9 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -168,7 +168,7 @@ get_major_server_version(ClusterInfo *cluster) if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 || sscanf(cluster->major_version_str, "%d.%d", &v1, &v2) < 1) - pg_fatal("could not parse PG_VERSION file from \"%s\"\n", cluster->pgdata); + pg_fatal("could not parse version file \"%s\"\n", ver_filename); fclose(version_fd); [parent: 45452825e5a1]