I have a problem starting Postgresql on Gentoo.
$ /etc/init.d/postgresql-9.1 start * Socket conflict. * A server is already listening on: * /var/run/postgresql/.s.PGSQL.5432 * HINT: Change PGPORT to listen on a different socket.
I removed the file
/var/run/postgresql/.s.PGSQL.5432 the service starts and runs fine.
I guess the sever shut down and left the file there. I checked with netstat to see if there was a process listening on that port but it wasn't any.
My question is, how can I avoid this problem in the future?