I would combine the two responses from Wilson and Grasshopper.
You can check the plist file for postgres with brew services list to find the location of the file and just open it in your favorite editor.
You should see a StandardErrorPath value indicated as:
<key>StandardErrorPath</key> <string>/usr/local/var/log/postgres.log</string>
And then you should close the end of the log file using tail -n 100 /usr/local/var/log/postgres.log
In my case, the error was as follows:
2017-12-06 11: 51: 16.078 GMT [85476] FATAL: the lock file "postmaster.pid" already exists 2017-12-06 11: 51: 16.078 GMT [85476] TIP: Is there another postmaster (PID 601) in the data directory "/ usr / local / var / postgres"?
This was due to the fact that I had to hard disable my Mac, and postgres did not get the opportunity to clear the PID file. Just delete the rm /usr/local/var/postgres/postmaster.pid PID file and run postgres brew services start postgresql
Warning word: do not delete this PID file if you are not sure that postgres is not working . You can do this by running brew services stop postgresql and then waiting for the result of the brew services list to show that posgres is in a stop state.
real_ate
source share