1
我可以使用pg_ctlcluster ver cluster stop
來停止給定集羣的服務,但是如果計算機重新啓動,它會再次啓動。我可以做一些改變postgresql.conf文件中的數據目錄的東西,但是這對我來說很陌生。什麼是禁用給定postgresql數據庫集羣的簡單方法?
我可以使用pg_ctlcluster ver cluster stop
來停止給定集羣的服務,但是如果計算機重新啓動,它會再次啓動。我可以做一些改變postgresql.conf文件中的數據目錄的東西,但是這對我來說很陌生。什麼是禁用給定postgresql數據庫集羣的簡單方法?
有(-基於Debian)pg_ctlcluster
的PostgreSQL安裝尋找一個start.conf
文件/etc/postgresql/<version>/<clustername>
這些內容:
# 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
將手動來避免自動啓動在系統啓動,每簇。
試試'sudo find/etc/postgresql -name start.conf'? –
嘗試'sudo update-rc.d postgresql disable'如果你在Ubuntu上 –