加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何禁用1版本的PostgreSQL服务器而不卸载它

发布时间:2020-12-13 16:22:47 所属栏目:百科 来源:网络整理
导读:我在我的Ubuntu机器上安装了PostgreSQL 9.1和9.2. postgresql服务启动两个版本: $sudo service postgresql start$* Starting PostgreSQL 9.1 database server [ OK ]$* Starting PostgreSQL 9.2 database server [ OK ] 我想启动9.2服务器,但没有卸载9.1,这
我在我的Ubuntu机器上安装了PostgreSQL 9.1和9.2. postgresql服务启动两个版本:
$sudo service postgresql start
$* Starting PostgreSQL 9.1 database server  [ OK ]
$* Starting PostgreSQL 9.2 database server  [ OK ]

我想启动9.2服务器,但没有卸载9.1,这可能吗?

精简版:
在/etc/postgresql/9.1/main/start.conf中将auto替换为manual

长版:

Debian / Ubuntu中的每个PostgreSQL集群都有一个start.conf文件,用于控制/etc/init.d/postgresql应该执行的操作.

这与pg_createcluster一起记录:

STARTUP CONTROL
   The start.conf file in the cluster configuration directory controls the
   start/stop behavior of that cluster’s postmaster process. The file can
   contain comment lines (started with ’#’),empty lines,and must have
   exactly one line with one of the following keywords:

   auto
       The postmaster process is started/stopped automatically in the init
       script.  This is also the default if the file is missing.

   manual
       The postmaster process is not handled by the init script,but
       manually controlling the cluster with pg_ctlcluster(1) is
       permitted.

   disable
       Neither the init script nor pg_ctlcluster(1) are permitted to
       start/stop the cluster. Please be aware that this will not stop the
       cluster owner from calling lower level tools to control the
       postmaster process; this option is only meant to prevent accidents
       during maintenance,not more.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读