好像没那么简单
MacBook-Air:BulletJournal $ pg_ctl -D /usr/local/var/postgres stop
pg_ctl: PID file "/usr/local/var/postgres/postmaster.pid" does not exist
Is server running?
brew services list 里面postgresql是stopped状态
MacBook-Air:BulletJournal $ brew services list
Name Status User Plist
mariadb stopped
postgresql stopped
unbound stopped
MacBook-Air:BulletJournal $ brew services stop postgresql
Error: Service `postgresql` is not started.
然而端口还是占用
MacBook-Air:BulletJournal $ sudo lsof -i :5432
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 12817 postgres 4u IPv6 0xd93867137910b6b5 0t0 TCP *:postgresql (LISTEN)
postgres 12817 postgres 5u IPv4 0xd938671373cb33f5 0t0 TCP *:postgresql (LISTEN)
我再研究一下