I just installed postgres on Debian 6 with apt-get. It works fine, but I had to change some configuration in postgresql.conf and now I'm trying to restart postgres.

If I try "service postgresql restart", I get the following error:

Stopping PostgreSQL 9.0 database server: mainError: Could not open /proc/8134/comm ... failed!

The same happens with cd /etc/init.d/postgresql restart

I tried this last as root and also as postgres user

Any clues?

link|improve this question
perhaps you should indicate what settings you changed. – vezult Oct 8 '11 at 2:44
Also, note that Debian 6 doesn't come with PostgreSQL 9, so you've installed it from somewhere outside the distro, and you should probably include that useful bit of information, too. – womble Oct 8 '11 at 3:22
feedback

1 Answer

up vote 1 down vote accepted

It looks like the issue is with the postgresql-common (123). Caused by this change:

* PgCommon.pm, cluster_info(): If we have a PID file and can read it (i. e.
as root), prefer doing this over probing the port. This delivers the
correct result with e. g. "pg_ctlcluster restart" when the port got
changed in the configuration file. (Closes: #643850)

The bug is being addressed and I suspect will be released with postgresql-common (124)? See: Launchpad PostgreSQL Repo

You should be able to use the above code to fix your issue, or try changing line 532 of /usr/share/postgresql-common/PgCommon.pm.

Change:

if (open PS, "/proc/$pid/comm") {

to something that exists:

if (open PS, "/proc/$pid/cmdline") {

That should work until the real fix is released.

link|improve this answer
postgresql-common (124) was completed 8 hours ago. – Kevin C. Smith Oct 8 '11 at 18:26
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.