'How to force stopped, Postgres Connection Error showing since hours "FATAL: The database system is starting up..."

I have postgres database setup on a Windows Server 2019 VM. I have upload some big data(~50 GB) through python script. I have seen data uploaded through pgadmin in tables.

Then due to some other issue I have restarted the VM and since then I am getting this error in connecting postgres sql server.

"FATAL: The database system is starting up..."*

I have seen the other posts saying this is not an error and it will be gone when in-memory buffers from WAL will applied to disk. Postgresql fatal the database system is starting up - windows 10

I have waited for 24 hours, but its still showing same message. I tried to restart the service through the cmd but restart failed and error still persist.

pg_ctl.exe restart -D  "C:\Program Files\PostgreSQL\13\data"

It does not seems writing anything on disk as I do not see any difference in disk size.

How can I force stop this and login to my server without loosing the already stored data.

Postgres Error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source