Stopping a postgresql instance
pg_ctl
is the postreSQL way to stop postgreSQL (in Ubuntu and Debian we should use pg_ctlcluster
which is a wrapper for pg_ctl
). The example in that link uses option `-p 5433".
As suggested by naoko in the comments below, use pg_lsclusters
to list clusters.
Another way is to give a kill
signal to the process running postgresqld. To stop both at once, killall postgresqld
might work.
Finally as suggested in the comment by psyCHOder, pgAdmin can also stop the server, but of course that means installing that package.