我刚刚用apt-get在Debian 6上安装了postgres。 它工作正常,但我不得不改变postgresql.conf中的一些configuration,现在我试图重新启动postgres。
如果我尝试“服务postgresql重新启动”,我得到以下错误:
停止PostgreSQL 9.0数据库服务器:mainError:无法打开/ proc / 8134 / comm …失败!
cd /etc/init.d/postgresql重新启动也一样
我最后作为根用户,也作为postgres用户
任何线索?
看起来问题是postgresql-common(123)。 由此引起的变化:
* PgCommon.pm, cluster_info(): If we have a PID file and can read it (ie as root), prefer doing this over probing the port. This delivers the correct result with eg "pg_ctlcluster restart" when the port got changed in the configuration file. (Closes: #643850)
该错误正在解决,我怀疑将与postgresql-common(124)发布? 请参阅: Launchpad PostgreSQL Repo
您应该可以使用上面的代码来解决您的问题,或尝试更改/usr/share/postgresql-common/PgCommon.pm的第532行。
更改:
if (open PS, "/proc/$pid/comm") {
到存在的东西:
if (open PS, "/proc/$pid/cmdline") {
这应该工作,直到真正的修复被释放。