postgresql-8.3 server does not start automatically

Bug #387682 reported by Jarl
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-8.3 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: postgresql-8.3

I use Kubunutu 9.04.

After installation I installed postgresql-8.3 using apt-get install. I discovered that postgresql was not started automatically, I had to do a manual /etc/init.d/postgresql-8.3 start after every boot.

The following links on the system existed on the system at this time:
   /etc/rc0.d/K21postgresql-8.3
   /etc/rc1.d/K21postgresql-8.3
   /etc/rc2.d/S19postgresql-8.3
   /etc/rc3.d/S19postgresql-8.3
   /etc/rc4.d/S19postgresql-8.3
   /etc/rc5.d/S19postgresql-8.3
   /etc/rc6.d/K21postgresql-8.3

I solved the problem by doing `sudo update-rc.d -f postgresql-8.3 remove' followed by `sudo update-rc.d postgresql-8.3 defaults'

The output is here:
$ sudo update-rc.d -f postgresql-8.3 remove
 Removing any system startup links for /etc/init.d/postgresql-8.3 ...
   /etc/rc0.d/K21postgresql-8.3
   /etc/rc1.d/K21postgresql-8.3
   /etc/rc2.d/S19postgresql-8.3
   /etc/rc3.d/S19postgresql-8.3
   /etc/rc4.d/S19postgresql-8.3
   /etc/rc5.d/S19postgresql-8.3
   /etc/rc6.d/K21postgresql-8.3
$ sudo update-rc.d postgresql-8.3 defaults
 Adding system startup for /etc/init.d/postgresql-8.3 ...
   /etc/rc0.d/K20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc1.d/K20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc6.d/K20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc2.d/S20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc3.d/S20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc4.d/S20postgresql-8.3 -> ../init.d/postgresql-8.3
   /etc/rc5.d/S20postgresql-8.3 -> ../init.d/postgresql-8.3

I find it a bit strange that the links removed, that is the links created during pacakge installation, are not the same as re-created by the command `sudo update-rc.d postgresql-8.3 defaults' They have different sequence numbers.

Jarl

Revision history for this message
Martin Pitt (pitti) wrote :

That's because postgresql itself creates the link priority as 19, whereas your manual invocation uses "defaults" which equals to 20. However, this by and large shouldn't make a difference. With the S19 links in place, can you please do a boot without "splash" (remove "splash" in the grub menu after pressing "e") and check if you see any output from the postgresql init.d script? Please also attach /var/log/postgresql/postgresql-8.3-main.log after such a start (without invoking it manually).

Changed in postgresql-8.3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Jarl (jarl-dk) wrote :

I did.

There was some "Fail" text in the boot phase, but the text quickly disappeard.

Now /etc/init.d/postgresql-8.3 status shows:
8.3 main 5432 down postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log

I am pretty confident that this was not the case prior to my fix.

However here is the file.

Revision history for this message
Jarl (jarl-dk) wrote :

I have supplied the requested info

Changed in postgresql-8.3 (Ubuntu):
status: Incomplete → New
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, that's interesting. Your problem is a duplicate of bug 264336. However, I was unable so far to reproduce this. I just wonder why starting postgresql a little later suddenly makes _more_ shared memory available; that's surprising because usually the processes that start earlier will consume shared memory, not free it.

Can you please give me the output of "ls -l /etc/rc2.d/S20*"? You can confirm that "sudo mv /etc/rc2.d/S19postgresql-8.3 /etc/rc2.d/S20postgresql-8.3" reliably fixes the problem?

Changed in postgresql-8.3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Jarl (jarl-dk) wrote :

"sudo mv /etc/rc2.d/S19postgresql-8.3 /etc/rc2.d/S20postgresql-8.3" does not reliably fix the problem (at the moment. I think I have been mangled into another (new) problem, namely bug 264336.

When I reported this problem initially, I could at least get a descent status of postgresql not running, with /etc/init.d/postgresql-8.3 status, now it gives me this line:
8.3 main 5432 online postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log

I will remove the mark-duplicate when can reliably confirm that it is not a duplicate. And recomment on whether "sudo mv /etc/rc2.d/S19postgresql-8.3 /etc/rc2.d/S20postgresql-8.3" fixes the problem.

Jarl

Revision history for this message
Jarl (jarl-dk) wrote :

I am really sorry.
"sudo mv /etc/rc2.d/S19postgresql-8.3 /etc/rc2.d/S20postgresql-8.3" has fixed my problem reliably.
I confused the output of sudo /etc/init.d/postgresql-8.3 status
"8.3 main 5432 online postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log" to mean it was not running.

It is running after "sudo mv /etc/rc2.d/S19postgresql-8.3 /etc/rc2.d/S20postgresql-8.3" and a boot

Revision history for this message
cad106uk (cad106uk-gmail) wrote : Will you join me on LinkedIn?

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Ciaran

Ciaran Doherty
--
United Kingdom

Confirm that you know Ciaran Doherty:
https://www.linkedin.com/e/-5ygcu6-h9pf5sok-56/isd/9651126940/4BjNnaF4/?hs=false&tok=19kiivdiyPaBw1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-5ygcu6-h9pf5sok-56/7VU4evm-UHFxZtrbSjFxPQv-1F7DYEmN0Fw48Am/goo/387682%40bugs%2Elaunchpad%2Enet/20061/I3223390612_1/?hs=false&tok=0-o2G16WSPaBw1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

Revision history for this message
cad106uk (cad106uk-gmail) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Ciaran

Ciaran Doherty
Python Consultant
London, United Kingdom

Confirm that you know Ciaran Doherty:
https://www.linkedin.com/e/-5ygcu6-hnhoty4b-5v/isd/9662502569/Bsemgd5Z/?hs=false&tok=18Khc6pq5gP5Y1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-5ygcu6-hnhoty4b-5v/7VU4evm-UHFxZtrbSjFxPQv-1F7DYEmN0Fw48Am/goo/387682%40bugs%2Elaunchpad%2Enet/20061/I5855394345_1/?hs=false&tok=3pcqb-DbdgP5Y1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

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.