重新启动MacBook Pro后,我无法启动数据库服务器:
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"?
我检查了日志,下面的行出现了一遍又一遍:
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.2, which is not compatible with this version 9.0.4.
9.0.4是mac上预装的版本。4]是我通过Homebrew安装的版本。
如前所述,这在重新启动之前是可以工作的,因此它实际上不可能是编译问题。我还重新运行了initdb /usr/local/var/postgres -E utf8
,文件仍然存在。