According to pg_lsclusters I have 2 servers running on Ubuntu 14.04:
Ver Cluster Port Status Owner Data directory Log file
9.1 main 5432 online postgres /var/lib/postgresql/9.1/main /var/log/postgresql/postgresql-9.1-main.log
9.3 main 5433 online postgres /var/lib/postgresql/9.3/main /var/log/postgresql/postgresql-9.3-main.log
What is the easiest way of shutting down the 9.1 server forever?
Using:
$/usr/lib/postgresql/9.1/bin/pg_ctl stop
I get the error:
pg_ctl: kein Datenbankverzeichnis angegeben und Umgebungsvariable PGDATA nicht gesetzt
(no database directory given and environment variable PGDATA not set)
What is the meaning of this error?
-D
switch. Alternatively I think usingservice postgresql-9.3 stop
should also work (the service name might be different though)