Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix bug brew install postgresql on macOS Mojave (pg_tblspc, pg_commit_ts etc..)

To fix errors like..

psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

...

could not open directory "pg_tblspc": No such file or directory

...

could not open directory "pg_commit_ts": No such file or directory

Run this command:

mkdir /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat,pg_stat_tmp,pg_replslot,pg_snapshots,pg_commit_ts}/

and start again:

pg_ctl -D /usr/local/var/postgres start

or

brew services start postgresql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment