$ brew install postgresql@16 $ brew services start postgresql@16
- Stop PostgreSQL
brew services stop postgresql@16
- Delete the postmaster.pid
rm -f /opt/homebrew/var/postgresql@16/postmaster.pid
- Start the PostgreSQL again
brew services start postgresql@16
After installing the postgres app: http://postgresapp.com/
It will create a database user with the current username, to create another user for example 'postgres':
$ createuser postgres -s
Open psql with the created user using -U
$ psql postgres -U postgres
Change the password
$ ALTER USER postgres WITH PASSWORD 'postgres';
$ su - postgres $ createdb testdb
$ psql