1

I'm trying to install postgreSQL on my windows 10 computer for the first time. I got an error at the end of the installation saying that there was a "problem running post-install step. Installation may not complete correctly. The database cluster initialization failed."

When I run the sql shell I get an error trying to do the default login that says 'chcp' is not recognized as an internal or external command. I set the environmental path variable to the bin of the Postgres folder in my program files. I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back to 2012 and don't seem to work anymore.

The one that seemed closest to working is postgresql installation failed.

However, I can't find "postgres" as a user. I get an error saying: "An object named "postgres" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection."

Does anybody have any updated solutions/tips for this?

foerever
  • 315
  • 7
  • 20
  • The Windows installer does not create a separate postgres user any more (since 9.0 I think). Did you select to put the **data directory** into `C:\Program Files`? It's a very annoying (and wrong in my opinion) default in the Windows installer, so you need to actively change that location. That directory is not writeable for regular users. Use some other directory with less restrictive privileges. –  Aug 25 '17 at 06:23
  • Yes I did, that was one of the earlier steps in the thread I listed. I think for the most part it's not a huge problem but I still get a chcp not recognized error so I am somewhat worried. – foerever Aug 25 '17 at 07:28
  • `chcp` is not called (or needed) when initializing the database cluster through `initdb`. It is also a standard command line program in Windows. If it's not found then something is messed up with your `PATH` content. Did the installer write a logfile? (I don't use the installer, I always just unzip the ZIP archive and run `initdb` manually) –  Aug 25 '17 at 07:33
  • https://stackoverflow.com/questions/23533980/postgresql-running-post-install-step-the-database-cluster-initialisation-failed – CCBet Dec 10 '20 at 13:34

0 Answers0