I'm trying to migrate PostgreSQL from 9.2 to 10.2 on CentOS 7
I've installed the new version, and I'm trying to implement the changeover:
/usr/pgsql-10/bin/pg_upgrade --old-datadir /var/lib/pgsql/data/ --new-datadir /var/lib/pgsql/10/data/ \
--old-bindir /usr/bin/ --new-bindir /usr/pgsql-10/bin/
The error I'm getting is:
could not open version file: /var/lib/pgsql/data/PG_VERSION
Failure, exiting
I try as root, and pg_upgrade
cannot be run as root.
/var/lib/pgsql
belongs to postgres:postgres so I'm at a bit of a loss how I can get this done.
Do I have to be a certain user to upgrade PostgreSQL using pg_upgrade
? How do I proceed to get this switched over to v10.2? I'm sure it's something I'm overlooking and simple.