PostgreSQL upgrade via pg_upgrade fails when using Red Hat Software Collections (RHSCL)
Issue
PostgreSQL upgrade via pg_upgrade
fails when using packages provided by Red Hat Software Collections (RHSCL).
For example, command for upgrading from Postgresql-9.6 to Postgresql-10 (both are provided by RHSCL) when run from PostgreSQL-10 RHSCL environment:
$ pg_upgrade --old-datadir=/db/pgdata/96 --new-datadir=/db/pgdata/10 --old-bindir=/opt/rh/rh-postgresql96/root/bin --new-bindir=/opt/rh/rh-postgresql10/root/bin --check
could not get pg_ctl version data using "/opt/rh/rh-postgresql96/root/bin/pg_ctl" --version: Success
Failure, exiting
Similar command when run from PostgreSQL-9.6 RHSCL environment:
$ pg_upgrade --old-datadir=/db/pgdata/96 --new-datadir=/db/pgdata/10 --old-bindir=/opt/rh/rh-postgresql96/root/bin --new-bindir=/opt/rh/rh-postgresql10/root/bin --check
check for "/opt/rh/rh-postgresql10/root/bin/pg_resetxlog" failed: No such file or directory
Failure, exiting
Environment
- Red Hat Enterprise Linux
- Red Hat Software Collections (RHSCL)
- PostgreSQL
pg_upgrade
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.