Am a noob to Mac OS and having trouble with Postgres on it. Initially installed Postgres 11 via the EnterpriseDB installer. Due to an issue with the system user name on mac having the '.' character, I created another mac user and re-installed Postgres via Homebrew, this time v9.6 since I came to know that was the version used in prod. Im not able to login to postgres. Have already tried a lot of advice on the internet and no luck. Now as a last resort I want to nuke the installs and start afresh. Im seeing
LOG: could not bind IPv6 address "::1": Address already in use 2019-08-06 12:14:48.429 IST [12386] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
and ps auxwww | grep postgres
postgres 513 0.0 0.0 4379700 2132 ?? S 6:39PM 0:00.29 /usr/libexec/trustd --agent
postgres 512 0.0 0.0 4379248 1152 ?? S 6:39PM 0:00.04 /usr/libexec/lsd
postgres 511 0.0 0.0 4333792 488 ?? S 6:39PM 0:00.03 /usr/sbin/cfprefsd agent
postgres 201 0.0 0.0 4344296 540 ?? Ss 6:38PM 0:00.95 postgres: stats collector process
postgres 200 0.0 0.0 4489360 1648 ?? Ss 6:38PM 0:00.27 postgres: autovacuum launcher process
postgres 199 0.0 0.0 4489296 352 ?? Ss 6:38PM 0:00.26 postgres: wal writer process
postgres 198 0.0 0.0 4489296 376 ?? Ss 6:38PM 0:00.30 postgres: writer process
postgres 197 0.0 0.0 4489296 404 ?? Ss 6:38PM 0:00.01 postgres: checkpointer process
postgres 193 0.0 0.0 4344296 360 ?? Ss 6:38PM 0:00.01 postgres: logger process
postgres 88 0.0 0.0 4489576 1380 ?? Ss 6:38PM 0:00.34 /Library/PostgreSQL/9.6/bin/postmaster -D/Library/PostgreSQL/9.6/data
What are the steps that need to be done on MacOS to ensure that both the installs are wiped away completely?
UPDATE Found out a way to remove the 9.x installed via Homebrew by running
sudo /Library/PostgreSQL/9.6/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh
Now,
$ ps aux | grep postgres
postgres 513 0.0 0.0 4379700 2880 ?? S 6:39PM 0:00.35 /usr/libexec/trustd --agent
postgres 512 0.0 0.0 4379304 3708 ?? S 6:39PM 0:00.07 /usr/libexec/lsd
postgres 511 0.0 0.0 4333792 916 ?? S 6:39PM 0:00.04 /usr/sbin/cfprefsd agent
postgres 13351 0.0 0.0 4317164 2776 ?? S 2:31PM 0:00.01 /usr/sbin/distnoted agent
Not able to remove these processes. Get a
Operation not permitted