Skip to content

Instantly share code, notes, and snippets.

@marlosirapuan
Last active April 3, 2019 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marlosirapuan/8b06d831819f550d9dd1bcf59e4d964b to your computer and use it in GitHub Desktop.
Save marlosirapuan/8b06d831819f550d9dd1bcf59e4d964b to your computer and use it in GitHub Desktop.
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