Postgresql – 配置文件参数解析(一)

解析Postgresql 10 参数文件
下面是我复制的一份postgres10的默认的参数文件。并加以注释。
***************************************************************************************************************************
# —————————–
# PostgreSQL configuration file
# —————————–
#
# This file consists of lines of the form:
#
# name = value
#
# (The “=” is optional.) Whitespace may be used. Comments are introduced with
# “#” anywhere on a line. The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
#
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, run “pg_ctl reload”, or execute
# “SELECT pg_reload_conf()”. Some parameters, which are marked below,
# require a server shutdown and restart to take effect.
#
# Any parameter can also be given as a command-line option to the server, e.g.,
# “postgres -c log_connections=on”. Some parameters can be changed at run time
# with the “SET” SQL command.
#
# 空间大小、时间计量单位
# Memory units: kB = kilobytes Time units: ms = milliseconds
# MB = megabytes s = seconds
# GB = gigabytes min = minutes
# TB = terabytes h = hours
# d = days
#——————————————————————————
# FILE LOCATIONS
#——————————————————————————
# 文件位置参数,一般采取默认,不需要修改。
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
#data_directory = ‘ConfigDir’ # use data in another directory
# (change requires restart)
#hba_file = ‘ConfigDir/pg_hba.conf’ # host-based authentication file
# (change requires restart)
#ident_file = ‘ConfigDir/pg_ident.conf’ # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = ” # write an extra PID file
# (change requires restart)
#——————————————————————————
# CONNECTIONS AND AUTHENTICATION
#——————————————————————————
# 连接和信任参数设置
# – Connection Settings –
# 监听地址设置,一般修改成 ‘*’
#listen_addresses = ‘localhost’ # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to ‘localhost’; use ‘*’ for all
# (change requires restart)
# 如果一个服务器中只有一个pg实例,无需修改,如果有多个,需要修改,确保每一个pg实例的端口不一样。
#port = 5432 # (change requires restart)
# 最大连接数,客户端连接要减去为superuser保留的数量,比如最大连接数100,superuser连接数为10,那普通用户只能连接90个
# 系统默认占5个,每个备库占一个,不计算在这个里面。
max_connections = 100 # (change requires restart)
# 为superuser保留的连接,是普通用户无法连接的数量。
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = ‘/var/run/postgresql, /tmp’ # comma-separated list of directories
# (change requires restart)
#unix_socket_group = ” # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = ” # defaults to the computer name
# (change requires restart)
# – Security and Authentication –
#authentication_timeout = 1min # 1s-600s
#ssl = off
#ssl_ciphers = ‘HIGH:MEDIUM:+3DES:!aNULL’ # allowed SSL ciphers
#ssl_prefer_server_ciphers = on
#ssl_ecdh_curve = ‘prime256v1’
#ssl_dh_params_file = ”
#ssl_cert_file = ‘server.crt’
#ssl_key_file = ‘server.key’
#ssl_ca_file = ”
#ssl_crl_file = ”
#password_encryption = md5 # md5 or scram-sha-256
#db_user_namespace = off
# 控制是否代替应用行安全策略而引发错误。当设置为ON时,策略通常适用。
#row_security = on
# GSSAPI using Kerberos
#krb_server_keyfile = ”
#krb_caseins_users = off
# – TCP Keepalives –
# see “man 7 tcp” for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default

转载自:https://blog.csdn.net/chuckchen1222/article/details/80729711

You may also like...