skip to Main Content

Hello i am 2 days stuck trying to install POSTGRE SQL. Today it is on version 16 but already attempted versions 14, 13, 15….

It looks like the bindata folder, which is the db cluster folder, has some kind of structure and on the end of installation i get a POP UP , indicating that the folder setup for the db clusters was not configured right.

I am installing this because i need to run a django project.

This log i got from C:Program FilesPostgreSQL16installation_summary.log:

Processados com sucesso 1 arquivos; falha no processamento de 0
arquivos

Called IsVistaOrNewer()… ‘winmgmts’ object initialized…
Version:10. MajorVersion:10 Granting full access to Administrators on
(C:PostgreSQLdata)

Executing batch file ‘rad30F8E.bat’… arquivo processado:
C:PostgreSQLdata Processados com sucesso 1 arquivos; falha no
processamento de 0 arquivos

Executing batch file ‘rad30F8E.bat’… processo filho terminou com
c¢digo de sa¡da 1 initdb: erro: O programa "postgres" ‚ requerido pelo
initdb mas nÆo foi encontrado no mesmo diret¢rio que "C:/Program
Files/PostgreSQL/16/bin/initdb.exe"

Called Die(Failed to initialise the database cluster with initdb)…
Failed to initialise the database cluster with initdb

Script stderr: Program ended with an error exit code

Error running C:WINDOWSSystem32cscript //NoLogo "C:Program
FilesPostgreSQL16/installer/server/initcluster.vbs" "NT
AUTHORITYNetworkService" "postgres" "****"
"C:UsersAdministradorAppDataLocalTemp/postgresql_installer_afbe97298d"
"C:Program FilesPostgreSQL16" "C:PostgreSQLdata" 5432
"Portuguese,Brazil" 0: Program ended with an error exit code Problem
running post-install step. Installation may not complete correctly
The database cluster initialisation failed. Setting variable whoami
from C:WINDOWSSystem32whoami Script exit code: 0

Script output: desktop-peu5949administrador

When it finishes installing i don’t get a windows service of the postgreSQL

error

Attempted:

Solution1

Solution2

Solution3

2

Answers


  1. I have the same situation (error messages and methods I tried).

    Did you find a solution for your problem?

    I’m not sure if it’s a windows update issue or EnterpriseDB’s distributions.

    This is the situation I am experiencing:


    Last week I received a delayed Windows 11 update to my computer (I receive updates every 5 weeks).

    After the update, Postgresql 14, which I was using, stopped working!. After that, I could not get the Postgresql service running again. What I tried :

    • Installing the latest Postgresql 14 version over the existing installation (version update): Failed.
    • Uninstalling Postgresql and installing the latest new Postgresql 16.1: Failed.
    • Trying all the methods in the links below:

    Error messages I get:
    At the very end of the Postgresql installation: "Problem running post-install step. Installation may not complete correctly. The database cluster initialization failed."

    I tried to run the postgresql service manually with initdb.exe with binary distribution but the result is the same again?


    Login or Signup to reply.
  2. After hours of struggle, the following method was the solution for me. I used this link for the solution:

    PostgreSql "running post install step…the Database Cluster Initialisation failed"

    — to create and run Postgresql database settings after installation :
    "C:Program FilesPostgreSQL16initdb.exe" -D "C:Program FilesPostgreSQL16data" -U postgres –locale="English_United States.1252"

    — to create and run the Postgresql service:
    "D:PostgreSQL16binpg_ctl.exe" register -N postgresql-x64-16 -D "D:PostgreSQL16bindata"

    There are a few details that I would like to draw attention to:
    My local computer has the settings Turkish_Turkey.1254. This is exactly how my previous Postgres installations were configured.

    The problem seems to be related to windows update or EnterpriseDB deployment settings. However, I am not sure which one exactly caused this error.

    The two lines above did exactly what I needed when I ran them from the command line (with administrator rights)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search