📜  杀死 mac 上的 postgres 服务 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:42.411000             🧑  作者: Mango

代码示例1
This ended up working:
First, get the pid:
$ sudo lsof -i:5432
Password:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 73 postgres 4u IPv6 0x8880707cadb2d1ab 0t0 TCP *:postgresql (LISTEN)
postgres 73 postgres 5u IPv4 0x8880707cadac18ab 0t0 TCP *:postgresql (LISTEN)
Now shut it down (SIGTERM):
$ sudo kill -15 73