如何防止Postgresql-9.4创建默认集群(主要)?我有Ubuntu 14.04,使用aptitude和postresql官方存储库。我正在使用ansible控制多个服务器,并想创建自己的集群。
负责自动创建主集群的是软件包postgresql-commons。该软件包的目的是允许多个群集在同一台计算机上的多个版本的PostgreSQL上运行。您可以同时安装不同版本的PostgreSQL。每个都可以管理多个集群。
Postgresql-commons在/ etc / postgresql-common /中有配置文件。一个特别有趣的是createcluster.conf。其内容如下:
# Default values for pg_createcluster(8)
# Occurrences of '%v' are replaced by the major version number,
# and '%c' by the cluster name. Use '%%' for a literal '%'.
# Create a "main" cluster when a new postgresql-x.y server package is installed
#create_main_cluster = true
# Default start.conf value, must be one of "auto", "manual", and "disabled".
# See pg_createcluster(8) for more documentation.
#start_conf = 'auto'
# Default data directory.
#data_directory = '/var/lib/postgresql/%v/%c'
# Default directory for transaction logs
# Unset by default, i.e. pg_xlog remains in the data directory.
#xlogdir = '/var/lib/postgresql/xlog/%v/%c/pg_xlog'
# Options to pass to initdb.
#initdb_options = ''
# The following options are copied into the new cluster's postgresql.conf:
# Enable SSL by default (using the "snakeoil" certificates installed by the
# ssl-cert package, unless configured otherwise here)
ssl = on
# Put stats_temp_directory on tmpfs
stats_temp_directory = '/var/run/postgresql/%v-%c.pg_stat_tmp'
# Add prefix to log lines
log_line_prefix = '%%t [%%p-%%l] %%q%%u@%%d '
为了防止它创建主集群,您必须安装postgresql-commons,取消注释行create_main_cluster,将其设置为false,然后以所需版本安装PostgreSQL。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句