I keep trying to kill a PostgreSQL process that is running on port 5432 to no avail. Whenever I type sudo lsof -i :5432
, I see something like the below:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME postgres 587 postgres 4u IPv6 0x218f97e9af5d0303 0t0 TCP *:postgresql (LISTEN) postgres 587 postgres 5u IPv4 0x218f97e9ae0f6c63 0t0 TCP *:postgresql (LISTEN)
I then try to kill the process 587 in this example with sudo kill -9 587
, but then another process automatically restarts on the same port! I have tried killing it on activity monitor as well to no avail. Please help?
Thanks, Laura
Go to Dashboard in your pgAdmin. At the bottom, in the Server Activity section, under the Sessions Tab, you can see all the Active queries. Now, notice the cross button and the Stop button to the left of each query.
If you installed postgres using brew, this command might be what you are looking for :
brew services stop postgres
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With