Reputation: 2591
I can use pg_ctlcluster ver cluster stop
to stop the service of a given cluster but if the machine reboots it starts right back up again. I could do something like change the data directory in it's postgresql.conf file but that smells to me.
Upvotes: 3
Views: 2054
Reputation: 61696
PostgreSQL installations that have pg_ctlcluster
(Debian-based) look for a start.conf
file in /etc/postgresql/<version>/<clustername>
with these contents:
# 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
Put manual instead to avoid auto-starting at boot, per-cluster.
Upvotes: 5