今天升级OS X Yosemite后,启动postgesql时报以下错误:
...
FATAL: could not open directory "pg_twophase": No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
据说可能是因为yosemite删除了pg的一些空目录导致的,所以解决方案也十分简单:
如果/usr/local/var/postgres/目录下没有pg_tblspc,pg_twophase和pg_stat_tmp子目录,直接新建这几个目录即可。
然后可以正常启动postgresql
时间: 2024-08-04 14:29:21