How does one stop a Postgresql instance, 9.2, on CentOS 7.
I found nothing under /etc/init.d/
nor a ctl program.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityWelcome to the world of systemd
Try something like:
service postgresql-9.2 stop
If that does not work, try to find the correct servicename:
systemctl list-units|grep postgresql
And retry above command with the part of the result just before the ".service".
on CentOS7:
'su - postgres -c "psql"'
and you should get confirmation postgres has in fact stopped:
'psql: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?'
systemctl stop postgresql*