PostgreSQL init script make Heartbeat's ResourceManager believe PostgreSQL is running, even when it is not

Bug #655431 reported by Andreas Ntaflos
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
postgresql-8.4 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: postgresql-8.4

The initd-functions of PostgreSQL 8.4.4-0ubuntu10.04 make Heartbeat's ResouceManager (/usr/share/heartbeat/ResourceManager) believe that PostgreSQL is running even when it is not, thus breaking clustering of Postgres instances using Heartbeat. I don't know if the problem is in Postgres or in Heartbeat but this is the result.

When calling

/etc/init.d/postgresql-8.4 status

the output is like the following:

  Running clusters: 8.4/main

And when no clusters are running:

  Running clusters:

In both cases the word "Running" appears on stdout, making ResourceManager believe that PostgreSQL is already started. ResourceManager thus does not try to start it even though it should. The check is in /usr/share/heartbeat/ResourceManager starting on line 205.

A really old bug filed against Debian's Heartbeat describes a similar problem: <http://us.generation-nt.com/bug-268670-heartbeat-does-not-start-resource-postgresql-help-165364291.html>. Sorry for that awful link but I can't seem to find the original bug report.

A fix to the init.d-functions could be as simple as removing the word "Running" from the output, as seen in the attached patch.

Again, I don't know if the problem is Postgres or Heartbeat and I don't know which should be fixed but since Postgres is the package that changed its behaviour (from previous versions, i.e. from 8.4.4ubuntu9.10 to 8.4.4ubuntu10.04) I think the fix should go here.

Revision history for this message
Andreas Ntaflos (daff) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postgresql-8.4 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.