我在Ubuntu 12.04服务器上启动了一个postgres 9.3实例:
~# service postgresql start * The PostgreSQL server failed to start. Please check the log output. [fail]
启动失败,但不留下日志,这个文件是空的:
tail /var/log/postgresql/postgresql-9.3-main.log
而且这个目录下没有其他文件:/ var / log / postgresql /
什么是解决这个问题的最佳方法?
尝试启用debugging手动运行。 这将导致它在前台运行,并将任何错误消息打印到标准错误,同时也增加了详细程度。
我相信这将成为Ubuntu上PostgreSQL 9.3的正确命令行,但是可能需要稍微调整一下(注意:为了便于阅读,将行分开;如果需要,可以将其重新组合为一行(不带反斜杠)):
/usr/lib/postgresql/9.3/bin/postgres -d 3 -D /var/lib/postgresql/9.3/main \ -c config_file=/etc/postgresql/9.3/main/postgresql.conf
开始是postgres
二进制文件的位置,然后我们启用debugging并将其设置为3级(您可以上下调整以增加或减less冗长)。 接下来我们指定数据目录和configuration文件开始。 这些应该是Ubuntu Server 12.04的默认值,我想。
希望这会给你足够的信息来确定问题出在哪里。