升级了 Yosemite 之后发现 PostgreSQL 不能启动了,运行
postgres -D /usr/local/var/postgres得到下面这个
FATAL: could not open directory "pg_tblspc": No such file or directory
原来 Yosemite 删除了一些 PostgreSQL 的目录,可以手动创建:
mkdir /usr/local/var/postgres/pg_tblspc
mkdir /usr/local/var/postgres/pg_twophase
mkdir /usr/local/var/postgres/pg_stat_tmp
Ok , it works!