yandex-qatools / postgresql-embedded

Embedded PostgreSQL Server
Other
493 stars 90 forks source link

"Possibly failed to run initdb" - Windows #136

Open intrepidOlivia opened 6 years ago

intrepidOlivia commented 6 years ago

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?

jablonskidawid commented 5 years ago

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

LukeButters commented 5 years ago

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 commented 5 years ago

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.

mfvanek commented 5 years ago

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

Jim-Lin commented 5 years ago

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