I am getting an error when attempting to upgrade a PostgreSQL installation. The full error is:
A data directory is registered in ***unknown variable postgresqlini*** but is neither empty or a recognized data directory
I've already had a look at this issue, which seems to be the only other one I can find which is related, but it did not help me. As you can see, my paths are surrounded by quotation marks.
Here is the full command that is run (separated to multiple lines to make it readable)
"C:\ProgramData\Package Cache\44103BBE02C9C99CB868F4767B0CC3B5D50B6C09\postgresql-10.11-1-windows-x64.exe" --unattendedmodeui minimal --mode unattended --servicename RM_Postgresql --servicepassword xyz --superpassword xyz --prefix "C:\Program Files\\company\postgres" --datadir "C:\Program Files\\company\data" --disable-components stackbuilder
This command is part of an installer which launches the PostgreSQL installer. I've been running the same command for nearly 2 years without any issues (using different versions of PostgreSQL on different computers). For some reason, it seems to now be failing on one of our machines, and I am unsure as to why.
The currently installed version of PostgreSQL on the computer where it is failing is 10.6-1, and I am attempting to update to 10.11-1 if that makes any difference.
This now seems to cause issue with the previous installation as well:
initializeDatabase fail on opening postgres msg=could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? QPSQL: Unable to connect