Postgres 不写日志

Postgres don't write log

重新启动 PostgreSQL 后,日志文件已停止写入。

只出现以下日志。

FATAL:  lock file "postmaster.pid" already exists
HINT:  Is another postmaster (PID 1351) running in data directory "/var/lib/pipelinedb/9.5"?
FATAL:  lock file "postmaster.pid" already exists
HINT:  Is another postmaster (PID 1351) running in data directory "/var/lib/pipelinedb/9.5"?
LOG:  redirecting log output to logging collector process
HINT:  Future log output will appear in directory "log".
LOG:  redirecting log output to logging collector process
HINT:  Future log output will appear in directory "log".
LOG:  redirecting log output to logging collector process
HINT:  Future log output will appear in directory "log".

您似乎已经有一个服务器实例 运行。尝试连接 psql 或使用 ps aux | grep -i postgres 进行检查。 如果另一个服务器实例是 运行,请不要 kill -9,因为您可能会损坏数据。相反:

pg_ctl -D /var/lib/pipelinedb/9.5 stop -m fast

之后你应该正确启动你的服务器。