2

I've seen many solutions and have been working on this issue for hours now.

After installation the post-installation script fails with the message above.

This is a development installation of EnterpriseDB On Windows 10 Pro (German Edition with English language pack).

  • No user created

  • No service created

  • No initialization happened

What I read about and tried without success (I hope I don't forget anything, as far as I remember these are all (at least most) solutions I tried posts from up to 10 years ago):

  • Checked whole file system privileges up to root of C:\, I have no other drive - this is a dev laptop.

  • Installed different locales because I read there could be issues. I tried "default", "C", "US English"

  • COMSPEC and other ENVs are correct, no trailing semicolon or other disturbances.

  • postgres password is simple

The installation works perfectly on a different laptop.

What I observed:

This issue is caused by a failing objShell.Run call in the VBS script.

The call is simply not executed. No error message. It "looks like" objShell.Run is called, seems to fail somehow and the DoCmd function where it is called returns. I don't even get a return value from objShell.Run, it just jumps out of DoCmd, thats it.

The written batch file exists. The path variables in the VBS are correct. The log file created inside the batch file is not created therefore I think it is not called at all. But it is created when I prevent the batch file from being deleted and calling it manually from command line. I prefixed the objShell.Run with "cmd /c " which caused it to run "more" but kept on getting other errors.

Unfortunately after several reinstalls, tries, reboots and so on I don't have the logs anymore. But if it is required for problem solving I'd be happy to provide it tomorrow.

I need to say I am not familiar with VBS but that is how far I was able to debug it. I also tried /X /D but I think i need deprecated tools for debugging, do I?

I spent hours with this problem and I'll leave it for today but I'm in desperate need for help.

Thanks.

(edit 1) Added which binary distribution

3
  • Do you remember how did you solve this? I am guessing is a problem with Windows 10 permissions on my machine.
    – nephewtom
    Mar 11 at 19:09
  • Still not solved. Since then I am manually installing Postgres to C:\Program Files\PostgreSQL, Create directory and permissions at C:\ProgamData\PostgreSQL for data and set up the service correctly. When I do updates i stop the service, delete the installation, extract it again, apply permissions and start it. Downtime ~1minute
    – Silberling
    Mar 13 at 14:35
  • To be honest I don't know what the source of the problem is and if it still exists. Because I install it manually I haven't tried.
    – Silberling
    Mar 13 at 14:37

2 Answers 2

0

The fix for this as I have faced this all weekend.
The installation Directory lets say its C:\Program Files\PostgreSQL Make sure that the Data Directory is C:\PostgreSQL\12\data

This fixed that problem for me.

1
  • This is definitely not a solution. It just works by accident. I am facing this problem since Postgres versions back to 9.2. On some Windows machines the initdb works perfectly, on others it fails. The usual solution mostly is "Use a different user account for installation" The Windows initdb programmers obviously heavily mess around with user permissions, which makes to operation fail on some systems.
    – fefewe
    Feb 19, 2020 at 12:19
-1

The steps described in the first answer of the following post helped me with this issue

https://stackoverflow.com/questions/23533980/postgresql-running-post-install-step-the-database-cluster-initialisation-failed

1
  • If you could capture the salient parts from the post mentioned in your question, that would be great. As it is, this is a link-only answer, and the target content of the link might change at any time.
    – Hannah Vernon
    Dec 10, 2020 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.