pg_upgrade: make get_major_server_version() err msg consistent
authorBruce Momjian <bruce@momjian.us>
Thu, 19 Mar 2020 19:20:55 +0000 (15:20 -0400)
committerBruce Momjian <bruce@momjian.us>
Thu, 19 Mar 2020 19:20:55 +0000 (15:20 -0400)
commit2247a1ea5fabafc11a6deab1c6fe822c9df45bb1
tree1c033ac7b6e325fc13dd02864d98fc68da39f932
parent45452825e5a11f8242a8012853bd2ff81e8b9620
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