Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just rebooted my server, but the PostgreSQL database server has not started.

I've tried the following command to see what's going on:

[root@p15179551 data]# service postgresql status
postgresql: unrecognized service

But as you can see, it says unrecognized service.

Any idea why it would be doing this?

share|improve this question
1  
I order to help we need to know what distribution you are running. And, if the file /etc/init.d/postgresql exists because that one is called when you issue "service postgresql status". –  Fladi Nov 22 '10 at 11:40
add comment

1 Answer

It seems postgresql isn't installed at all or at least its init scripts are missing.

Did your server crash? Did you (unintentionally) remove the postgresql package? Check if the postgresql package is installed. It can be doning in ubuntu/debian with this command:

aptitude search 'postgresql~i'

If there is any output postgresql should be installed. It that case try reinstalling it:

aptitude reinstall postgresql

If it isn't installed at all install it using:

aptitude install postgresql
share|improve this answer
    
Not sure if it crashed, but it wasn't working correctly. Could it be a problem with which user I am trying to issue the command from? All the postgresql files still seem to be on the server –  Probocop Nov 22 '10 at 10:11
    
At least with ubuntu it doesn't depend on the user issuing the command. What os are you using? If you are using ubuntu try aptitude search postgresql and check if there is an 'i' in front of the postgresql package. –  joke Nov 22 '10 at 10:28
    
The server is running Fedora Core 2. I got it restarted in the end by logging in as the postgres user. Thanks for your help. –  Probocop Nov 22 '10 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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