问题
I am on CentOS 6.5 running PostGreSQL 9.3 and when I run the command service postgresql-9.3 stop
I get the [ OK ] as if it has stopped but the service is either still running or starts automatically when it is stopped because I can run the service postgresql-9.3 stop
over and over again and always get the [ OK ] as if it has been stopped. Trying to start or restart gives the [FAILED] message. How can I stop this? I get an error that says FATAL: could not create any TCP/IP sockets
when I try to run rake db:setup
for my rails project. There is no socket file in the /tmp directory for PrestGreSQL but it seems like PG thinks there is. I had the idea to uninstall postgres and do a fresh install but I need to stop the service in order for it to work. Any help is appreciated.
回答1:
Check the stauts of the service
service postgresql-9.1 status
If service already stopped, find any zombie process and kill
ps -ef | grep postgres
来源:https://stackoverflow.com/questions/22822893/postgresql-service-unable-to-stop-start-restart