[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
Wow, works like a treat!! I'd definitely expect there to be only one way to do it, and for `service postgresql start 9.3` to have the effect that `service postgresql pgstart 9.3` has in your patch. With much thanks, Eoghan -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: Confirmed Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
** Attachment added: "supporting init.d-functions script" https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+attachment/4473744/+files/init.d-functions -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: Confirmed Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
Hi Eoghan, I found out that the service start, stop and status commands are interfering with the start(), stop() and status() functions defined in the /usr/share/postgresql-common/init.d-functions script which is loaded from /etc/init.d/postgresql You can have the scripts changed to use commands like pgstart instead of start then it works. See attached scripts. ** Attachment added: "init.d script" https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+attachment/4473743/+files/postgresql -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: Confirmed Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
** Changed in: postgresql-common (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: Confirmed Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
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 Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: New Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
Hi jeroen, Thanks for your reply. Running `ps -elf |grep postg` shows both: 0 S postgres 30213 1 1 80 0 - 331047 poll_s 14:49 ? 00:00:00 /usr/lib/postgresql/9.3/bin/postgres -D /var/lib/postgresql/9.3/main -c config_file=/etc/postgresql/9.3/main/postgresql.conf 0 S postgres 30214 1 4 80 0 - 4088839 poll_s 14:49 ? 00:00:00 /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf (neither are shown after `service postgresql stop`) I can also connect to both databases. My notes tell me I did something along the lines of the following: deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main sudo apt-get update sudo apt-get install postgresql-9.4 postgresql-server-dev-9.4 postgresql-contrib-9.4 # ... later sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 (Note discrepency between viviid (my installation) and wheezy in the apt line — I didn't think that was significant? -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: New Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1498274] Re: init.d script doesn't respect `version` argument
Hi Eoghan, Can you explain how do you see both 9.4 and 9.3 are started? Which command or logs are you using or checking? You state you are running on Ubuntu 15.04 which did not ship with Postgres 9.3, can you explain how you got postgresql 9.3 on this Ubuntu release? -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-common in Ubuntu. https://bugs.launchpad.net/bugs/1498274 Title: init.d script doesn't respect `version` argument Status in postgresql-common package in Ubuntu: New Bug description: Release: Ubuntu 15.04 It seems that the current version of the /etc/init.d/postgresql script doesn't respect the `version` flag. Help text states: Usage: /etc/init.d/postgresql {start|stop|restart|reload|force- reload|status} [version ..] But with 2 installations and called as follows: /etc/init.d/postgresql start 9.4 or service postgresql start 9.4 Both 9.4 and 9.3 are started, I expected just 9.4 to start. Package info: # apt-cache policy postgresql-common postgresql-common: Installed: 169.pgdg14.04+1 Candidate: 169.pgdg70+1 Version table: 169.pgdg70+1 0 500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages *** 169.pgdg14.04+1 0 100 /var/lib/dpkg/status 166bzr2 0 500 http://mirror.hetzner.de/ubuntu/packages/ vivid/main amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1498274/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp