On Kubuntu 20.04
Before I can successfully start a docker container on my computer I need to kill a Postgres process. I do this by:
sudo ss -lptn 'sport = :5432'
,which outputs: State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 244 127.0.0.1:5432 0.0.0.0:* users:(("postgres",pid=1003,fd=5))
kill <pid>
Now I would be able to run the docker container that has a Postgres database. I'd like it so that I don't have to follow those steps before I can run any Postgres database. For some reason lsof -i :5432 does not return the process.
Is it standard behaviour for Postgres to be running in the background? Is it safe to stop this process? If yes, how can I stop this process from running automatically in the background?
I have tried the following commands with no success: sudo systemctl disable postgresql sudo update-rc.d postgresql disable