Home:ALL Converter>pg_upgrade for Postgres12 failing with PG_VERSION

pg_upgrade for Postgres12 failing with PG_VERSION

Ask Time:2020-08-27T05:41:44         Author:balaks80

Json Formatter

I am trying to upgrade my postgreSQL 10 database on Ubunutu 18.04 server to postgreSQL 12. I have installed the 12 binaries and post shutdown of the 10 intance, I am running the check command as shown below and it fails with the below error. The /pgsqlp/data/pg12 is the new data directory and /pgsqlp/data/pgdata is my old data directory. I can manually touch the file in the new directory but then it fails to create the next directory. Is there any debug option or additonal logging that can be enabled for pg_upgrade to check where the error is ?

time /usr/lib/postgresql/12/bin/pg_upgrade -b /usr/lib/postgresql/10/bin -B /usr/lib/postgresql/12/bin -d /pgsqlp/data/pgdata -D /pgsqlp/data/pg12 -c

could not open version file "/pgsqlp/data/pg12/PG_VERSION": No such file or directory Failure, exiting

real 0m0.011s user 0m0.007s sys 0m0.004s

Author:balaks80,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63606124/pg-upgrade-for-postgres12-failing-with-pg-version
yy