I have Debian 8.2 x64 and Postgresql 9.4 (from repo). I've recreated default cluster in different location like this:
# service postgresql stop
# pg_dropcluster 9.4 main
# pg_createcluster -d /srv/postgresql/data/9.4/main 9.4 main -- -W -A md5
# service postgresql start
and then I can connect to the database with:
# psql -WU postgres
then I've created another cluster with:
# pg_createcluster -d /srv/postgresql/data/9.4/apps -p 5433 9.4 apps -- -W -A md5
I can start it with:
# pg_ctlcluster 9.4 apps start
and connect:
# psql -WU postgres -p 5433
but the init script starts only the main
cluster ignoring apps
and acording to the man pages if /etc/postgresql/9.4/apps/start.conf
doesn't exists it is assumed to auto start cluster. But this is my /etc/postgresql/9.4/apps/start.conf
# Automatic startup configuration
# auto: automatically start/stop the cluster in the init script
# manual: do not start/stop in init scripts, but allow manual startup with
# pg_ctlcluster
# disabled: do not allow manual startup with pg_ctlcluster (this can be easily
# circumvented and is only meant to be a small protection for
# accidents).
auto
so it should also start apps
cluster or did I misunderstand something or there should be some other options set ?
UPDATE
Well I think I've fixed my problem with:
# apt-get install --reinstall postgresql-common
and after this all clusters are controlled by the init script, and:
# service postgresql start|stop|restart
or
systemctl start postgresql.service
affect all clusters. It's weird cause first installation and reinstallation didn't report any errors.