I need some help please, I am upgrading postgresql from v10 to v11 on Windows, but get the following error message: could not open version file: C:/Program Files/PostgresSQL/11/data/PG_VERSION
.
Here are the steps taken:
Stopped both PostgresSQL v10 and PostgresSQL v11 services using
services.msc
Set full access control/complete permissions for users for both v10 and v11.
- Created 'postgres' user account with full admin rights.
Opened command-line and entered
RUNAS /USER:postgres "CMD.EXE
prompted to enter password for user postgres user.
New command-line window opens and cd to 'C:\Program Files\PostgreSQL\11'.
- Entered the following:
pg_upgrade.exe --old-datadir "C:/Program Files/PostgreSQL/10/data" --new-datadir "C:/Program Files/PostgreSQL/11/data" --old-bindir "C:/Program Files/PostgreSQL/10/bin" --new-bindir "C:/Program Files/PostgreSQL/11/bin" --check
On pressing enter I get the above mentioned error.
I am new to the whole process of using PostgreSQL.
Any thoughts on what is wrong?
pg_upgrade
from v11 and ran the followingpg_upgrade --old-datadir "C:/Program Files/PostgreSQL/10/data" --new-datadir "C:/Program Files/PostgreSQL/11/data" --old-bindir "C:/Program Files/PostgreSQL/10/bin" --new-bindir "C:/Program Files/PostgreSQL/11/bin" --check
fromC:\Program Files\PostgreSQL\11
from the cli – Glaserc:\Program File
is a really bad idea. Regular users are not allowed to write there (for good reasons). It's a really, really bad choice of the EnterpriseDB installer to suggest that directory.%ProgramData%
is much better place to store that – Chicky