pgsql: pg_upgrade: make get_major_server_version() err msg consistent

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_upgrade: make get_major_server_version() err msg consistent
Date: 2020-03-19 19:21:03
Message-ID: E1jF0j1-0001a9-GP@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2247a1ea5fabafc11a6deab1c6fe822c9df45bb1

Modified Files
--------------
src/bin/pg_upgrade/server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2020-03-19 19:23:20 pgsql: Revert "Specialize MemoryContextMemAllocated()."
Previous Message Alexander Korotkov 2020-03-19 18:42:32 pgsql: Add new typedefs introduced in 773df883e8 to typedefs.list