postgresql-embedded icon indicating copy to clipboard operation
postgresql-embedded copied to clipboard

"Possibly failed to run initdb" - Windows

Open intrepidOlivia opened this issue 7 years ago • 5 comments

I am trying to run tests using an embedded postgres server, but the process just hangs indefinitely after it extracts the archive and runs all the insert statements. There's one small Warning line that states Possibly failed to run initdb, but provides no further information about what went wrong or whether it actually failed to run and if that's what the problem is. Is there any way I can debug this?

intrepidOlivia avatar Jun 20 '18 21:06 intrepidOlivia

There is a problem with starting instance of postgres process. Try to run embedded postgres manually. Run exec C:\Users\USERNAME.embedpostgresql\postgresql-9.6.8-1-windows-x64-binaries\pgsql\bin\initdb.exe. I had message box with error due to missing library MSVCR120.dll and after installing it (https://www.microsoft.com/en-us/download/confirmation.aspx?id=40784) embedded prostgres started

jablonskidawid avatar Dec 05 '18 07:12 jablonskidawid

I wonder if it would be possible to detech if MSVCR120 is missing and print a warning, rather than have nothing printed to console and no error shown at all.

LukeButters avatar Dec 27 '18 04:12 LukeButters

Perhaps what would also help is adding support for capturing the output of from the commands run or checking the exit code and printing what command failed. Currently under windows nothing is printed at all making debugging hard.

LukeButters avatar Dec 28 '18 02:12 LukeButters

I've faced with the same problem. Could you please increase priority of this issue?

mfvanek avatar Apr 19 '19 14:04 mfvanek

i solve it by the follows

  1. download postgresql-windows.exe from official site
  2. execute exe and wait it install requirement 01
  3. click Cancel 02

that's all, maybe help you guys

Jim-Lin avatar Jul 11 '19 12:07 Jim-Lin