My PC is running windows 10 ver 1803.
I downloaded the zip containing the binary of postgres 10.
When I tried to init the db with:
initdb.exe -D ../data –A trust
I received this error: child process was terminated by exception 0xC00000FD
creating directory ../data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... child process was terminated by exception 0xC00000FD
initdb: removing data directory "../data"
I tried to change version but postgres 11 and postgres 9.6 give to me the same result.
So I tried to install postgres 10 from the windows installer but the log in %TEMP% folder logged the same error:
Executing batch file 'rad99CE0.bat'...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory C:/Program Files/PostgreSQL/10/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... child process was terminated by exception 0xC00000FD
initdb: removing contents of data directory "C:/Program Files/PostgreSQL/10/data"
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 cscript //NoLogo "C:\Program Files\PostgreSQL\10/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Program Files\PostgreSQL\10" "C:\Program Files\PostgreSQL\10\data" 5432 "DEFAULT" 0: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
[16:02:52] Delete the temporary scripts directory...
Creating menu shortcuts...
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\10\installer\server\createshortcuts_clt.vbs" "PostgreSQL 10" "C:\Program Files\PostgreSQL\10"
Script exit code: 0
I tried to uninstall and reinstall with postgres user and give postgres user the Administrators group but nothing changed.
Having the installation on an external hard drive I tried to do the same init on the same postgres10/bin folder from another PC with Windows 10 and the DB is initialized successfully at the first time. No installation needed. The DB is starting well with:
pg_ctl.exe -D ../data start
When I reconnect my drive with the data folder created on my original PC, if I start the db with the instruction above, the server never start and after reaching the timeout, the process exits. No log at all.
D:\pgsql10\bin>pg_ctl.exe -D ../data start
waiting for server to start............................................................... stopped waiting
pg_ctl: server did not start in time
Any ideas?