I just reinstalled postgres via
brew install postgres
initdb /usr/local/var/postgres -E utf8 but got this:
The files belonging to this database system will be owned by user "atal421". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default text search configuration will be set to "english". initdb: directory "/usr/local/var/postgres" exists but is not empty If you want to create a new database system, either remove or empty the directory "/usr/local/var/postgres" or run initdb with an argument other than "/usr/local/var/postgres".
rm -rf the postgres folder and ran it again:
initdb /usr/local/var/postgres -E utf8
it said everything was okay:
Success. You can now start the database server using: postgres -D /usr/local/var/postgres
so, I ran that command and got:
postgres -D /usr/local/var/postgres FATAL: lock file "postmaster.pid" already exists HINT: Is another postmaster (PID 13731) running in data directory "/usr/local/var/postgres"?
Now when I look at my Activity Monitor I can see 6 instances of postgress.
How do I fix this?