PostgreSQL is one of the most advanced open source database resources used by programmers, database administrators, app developers and system administrator around the world. But recently, many users have reported a problem, according to which PostgreSQL won’t start. It doesn’t start or restart after updates on Mac, Windows and other operating systems. Homebrew postgres is also not starting after uninstallation, reboot or reinstallation.
Many users have complained that when they install Postgresql via homebrew, everything works fine until the system is rebooted or restarted. The complete instances of postgres stop running.
Here is the log error message faced by many people.
postgres cannot access the server configuration file “/usr/local/var/postgres/postgresql.conf”: No such file or directory
Here are a few solutions in order to fix PostgresSQL not starting, restarting in Mac, Windows or any other operating system.
The first solution is to make sure that /usr/local/var/postgres/postmaster.pid does not exist anymore before restarting the server. Why? Because the file remains on the disk and acts as a lock on a global scope through the system. It should be deleted.
On a crash instead of a regular shutdown, this file will remain on disk. It …read more