问题原文
原帖链接 · Max L. · CC BY-SA 3.0
I'm starting up a postgres 9.3 instance on a ubuntu 12.04 server :
~# service postgresql start
* The PostgreSQL server failed to start. Please check the log output.
[fail]
the start fails, but it leaves no log, this file is empty :
tail /var/log/postgresql/postgresql-9.3-main.log
and the are no other files in this directory : /var/log/postgresql/
what is the best way to troubleshoot this ?
已采纳解答
原帖链接 · Christopher Cashell · CC BY-SA 3.0
Try running it manually with debug enabled. This will cause it to run in the foreground and print any error messages to standard error, while also increasing the verbosity.
I believe this will be the correct command line for PostgreSQL 9.3 on Ubuntu, but it might require some very slight tweaking (note: line is split for readability; you can recombine it to a single line (without the backslash) if you want):
/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
The beginning is the location of the postgres binary, then we enable debug and set it to level 3 (you can adjust this up or down to increase or decrease verbosity). Next we specify the data directory and the config file to start with. These should be the defaults for Ubuntu Server 12.04, I think.
Hopefully, that'll give you enough information to determine where the problem is.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
