0

I got the error in question on my Windows11 for Postgres-V-12. The followed the below steps suggested by ASL:

initdb -D "D:\PostgreSql\12\data" -U postgres

pg_ctl start -D "D:\PostgreSql\12\data"

Now after the last step I am getting an error message; It says:

waiting for server to start....
postgres: could not find the database system 
Expected to find it in the directory "D:/postgresqldata", but could not open file "D:/postgresqldata/global/pg_control": No such file or directory 
stopped waiting 
pg_ctl: could not start server.

Can someone please help me to resolve this issue?

1 Answer 1

0

Please check the service postgresql status in windows services.

Ensure it is running.

Sign up to request clarification or add additional context in comments.

4 Comments

It's running, but still getting the error in the title
Ensure the availability of "D:\postgresqldata" folder first . Run the command pg_ctl -D "D:\postgresqldata" initdb and post the output please.
"D:/postgresqldata" is the data directory I selected while installing postgres
This is the output after running above command: Data page checksums are disabled. fixing permissions on existing directory D:/postgresqldata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... windows selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Calcutta creating configuration files ... ok running bootstrap script ... pg_ctl: database system initialization failed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.