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

PostgreSQL9.6 服务器参数配置

发布时间:2020-12-13 17:01:35 所属栏目:百科 来源:网络整理
导读:# - Connection Settings - listen_addresses = '*' max_connections = 300 # - TCP Keepalives - tcp_keepalives_idle = 60 tcp_keepalives_interval = 10 tcp_keepalives_count = 6 # - Memory - shared_buffers = 1GB #shared_buffers=32GB(25 percent ph

# - Connection Settings -

listen_addresses = '*'

max_connections = 300


# - TCP Keepalives -

tcp_keepalives_idle = 60

tcp_keepalives_interval = 10

tcp_keepalives_count = 6


# - Memory -

shared_buffers = 1GB

#shared_buffers=32GB(25 percent phisycal memory);

work_mem = 64MB

maintenance_work_mem = 512MB

dynamic_shared_memory_type = posix



# - Asynchronous Behavior -

max_worker_processes = 100 # (change requires restart)

max_parallel_workers_per_gather = 3 # taken from max_worker_processes


# - Checkpoints -

checkpoint_timeout=30min

max_wal_size = 10GB

min_wal_size = 5GB

# - Planner Cost Constants -

#parallel_tuple_cost = 0.1# same scale as above

#parallel_setup_cost = 1000.0# same scale as above

#min_parallel_relation_size = 8MB


# - Other Planner Options -

#force_parallel_mode = off


# - log setting -

log_destination = 'stderr'

logging_collector = on

log_directory = 'pg_log'

log_filename = 'postgresql-%a.log'

log_file_mode = 0600

log_truncate_on_rotation = on

log_rotation_age = 1d

log_rotation_size = 0

log_statement = 'none'

log_line_prefix ='%t [%p]: [%l-1] user=%u,db=%d '

log_timezone = 'PRC'

log_checkpoints = on

log_connections = on

log_disconnections = on

log_duration = on

log_lock_waits = on

log_temp_files = 0

log_min_duration_statement = 1000

track_activity_query_size = 2048

(编辑:李大同)

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

    推荐文章
      热点阅读