I'm using Windows 10. I recently had a system failure that required me to resinstall windows and most of my software. I also had to reinstall PostGres. I didn't have an opportunity to make any backups, but my data directory was on a separate, encrypted drive and it's still accessible. The data files are HUGE as I'm working with huge repo of data from an educational institution.
Postgres reinstalled fine. I tested it, then stopped the service, updated the registry entry for the postgres ImagePath to the data directory I wish to use, and verified the change in the Windows service panel.
But: I can't start the postgres service after adding the updated data directory, trying to log in through phpPgAdmin fails, and the Postgres log in the relevant data directory is not being updated. I've retried these steps a dozen times to make sure I'm not making any errors.
If I change the data directory back to default, everything works fine.
I am using PostGres 9.4, which is the same version I had before. I tried with a newer version of postGres too. What am I missing here? I don't have access to all of the database sql files I originally used so I really need to access this data directory again!
Thanks in advance for any tips you can provide.
UPDATE:
Progress! I didn't think to check event viewer. It revealed a few errors and I have resolved all but one:
FATAL: database files are incompatible with server DETAIL: database cluster was initialized with PG_CONTROL_VERSION 1100, but the server was compiled with PG_CONTROL_VERSION 942. HINT: It looks like you need to initdb.
When I reinstalled PG I grabbed v11 and tried to connect to my old data dir. It failed, so I uninstalled v11 and installed v9.4. It must have updated something when I tried the wrong version. I'm not sure what it's saying when it asks me to initdb.