Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* Debian系で自動起動を制御する [#le864fb5]
** pg_ctlclusterコマンドとpg_lsclustersコマンド [#vc648578]
- 手動で起動を制御する場合、pg_ctlclusterコマンドとpg_lsc...
- /etc/init.d/postgresqlから上の2つのコマンドが呼び出され...
** 任意のバージョンのPostgreSQLサーバの自動起動を止める [...
*** 現在の起動状況の確認 [#ydda980a]
$ pg_lsclusters
Ver Cluster Port Status Owner Data directory ...
9.6 main 5433 online postgres /var/lib/postgresql/9.6...
12 main 5432 online postgres /var/lib/postgresql/12/...
*** 任意のバージョンの自動起動の無効化 [#ode6fe60]
$ vi /etc/postgresql/9.6/main/start.conf
--------------------------------------------------------...
# Automatic startup configuration
# auto: automatically start the cluster
# manual: manual startup with pg_ctlcluster/postgresql...
# disabled: refuse to start cluster
# See pg_createcluster(1) for details. When running from...
# invoke 'systemctl daemon-reload' after editing this fi...
manual
--------------------------------------------------------...
- デフォルトでは'''auto'''になっているので'''manual'''に...
*** 設定反映してPostgreSQLサーバを再起動 [#i71ca3e4]
$ sudo /etc/init.d/postgresql restart
$ pg_lsclusters
Ver Cluster Port Status Owner Data directory ...
9.6 main 5433 down postgres /var/lib/postgresql/9.6...
12 main 5432 online postgres /var/lib/postgresql/12/...
** 参考 [#v0a4727b]
https://dba.stackexchange.com/questions/31210/preventing-...
終了行:
* Debian系で自動起動を制御する [#le864fb5]
** pg_ctlclusterコマンドとpg_lsclustersコマンド [#vc648578]
- 手動で起動を制御する場合、pg_ctlclusterコマンドとpg_lsc...
- /etc/init.d/postgresqlから上の2つのコマンドが呼び出され...
** 任意のバージョンのPostgreSQLサーバの自動起動を止める [...
*** 現在の起動状況の確認 [#ydda980a]
$ pg_lsclusters
Ver Cluster Port Status Owner Data directory ...
9.6 main 5433 online postgres /var/lib/postgresql/9.6...
12 main 5432 online postgres /var/lib/postgresql/12/...
*** 任意のバージョンの自動起動の無効化 [#ode6fe60]
$ vi /etc/postgresql/9.6/main/start.conf
--------------------------------------------------------...
# Automatic startup configuration
# auto: automatically start the cluster
# manual: manual startup with pg_ctlcluster/postgresql...
# disabled: refuse to start cluster
# See pg_createcluster(1) for details. When running from...
# invoke 'systemctl daemon-reload' after editing this fi...
manual
--------------------------------------------------------...
- デフォルトでは'''auto'''になっているので'''manual'''に...
*** 設定反映してPostgreSQLサーバを再起動 [#i71ca3e4]
$ sudo /etc/init.d/postgresql restart
$ pg_lsclusters
Ver Cluster Port Status Owner Data directory ...
9.6 main 5433 down postgres /var/lib/postgresql/9.6...
12 main 5432 online postgres /var/lib/postgresql/12/...
** 参考 [#v0a4727b]
https://dba.stackexchange.com/questions/31210/preventing-...
ページ名: