postgis froce kill process code example

Example 1: killing the postgres service on mac

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

Example 2: postgres auto listening when kill pid

brew services stop postgres

Tags:

Misc Example