I've encountered problem about brew services on postgresql@11 right now. After i reinstalled (from this blog) postgresql@11 it instantly gives an error on brew services
. Then i ran this brew services restart -vvv postgresql@11
it returns this result:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.postgresql@11</string>
<key>ProgramArguments</key>
<array>
<string>~/.homebrew/opt/postgresql@11/bin/postgres</string>
<string>-D</string>
<string>~/.homebrew/var/postgresql@11</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>~/.homebrew/var/log/postgresql@11.log</string>
<key>StandardOutPath</key>
<string>~/.homebrew/var/log/postgresql@11.log</string>
<key>WorkingDirectory</key>
<string>~/.homebrew</string>
</dict>
</plist>
When i check the ~/.homebrew/var/log/postgresql@11.log
file, it is empty. Also i check permissions on that file but it is ok(r,w). Still getting this error without any explanation(empty logs). 2 days ago it was working but somehow i broke it. Also i checked postmaster.pid but the file is not exist on my machine, i searched like this: find . -name "postmaster.pid"
Additionally, after i reinstalled postgresql@11 in my postgresql@11 directory (~/.homebrew/var/postgresql@11
) is all empty.
Lastly, in my directory -> ~/.homebrew/Cellar/postgresql@11/11.13/bin
there is postmaster file but it is not postmaster.pid file i dont know what is it for, but when i do ls -al
it shows like this -> postmaster -> postgres
My machine is macOS Big Sur 11.5.2 on m1 chip macos. Hopefully someone gives me an idea about it.
What i realize right now is i have problem with installation as well.
brew postinstall postgresql@11
as a result ->
Last 15 lines from ~/Library/Logs/Homebrew/postgresql@11/post_install.01.initdb:
2021-08-23 08:27:42 +0300
~/.homebrew/Cellar/postgresql@11/11.13/bin/initdb
--locale=C
-E
UTF-8
~.homebrew/var/postgresql@11
no data was returned by command ""~/.homebrew/Cellar/postgresql@11/11.13/bin/postgres" -V"
The program "postgres" is needed by initdb but was not found in the
same directory as "~/.homebrew/Cellar/postgresql@11/11.13/bin/initdb".
Check your installation.
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall postgresql@11
However what i see is initdb and postgres in the same bin folder :/
Thanks,