Hi Eoghan,

I could reproduce the situation. First installed Postgres 9.3 then 9.4.
ps shows both versions running.

I looked at the /etc/init.d/postgresql script and the status command would 
effectively execute this:
echo "`pg_lsclusters -h`" | awk 'BEGIN {rc=0} {if (match($4, "down")) rc=3; 
printf ("%s/%s (port %s): %s\n", $1, $2, $3, $4)}; END {exit rc}'

which should result in this output:
9.3/main (port 5432): online
9.4/main (port 5433): online

but instead running '/etc/init.d/postgresql status' outputs this:
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor 
preset: enabled)
   Active: active (exited) since Thu 2015-09-24 10:28:20 UTC; 3min 13s ago
  Process: 851 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 851 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service


Looks like Upstart is taking over somewhere and may indeed not honour the extra 
options like the version number.

I am not sure if this is really a bug or not. It is at least not
behaving as you would expect from what you read in the script.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1498274

Title:
  init.d script doesn't respect `version` argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to