PostgreSQL9.6 服务器参数配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PostgreSQL9.6 服务器参数配置相关的知识,希望对你有一定的参考价值。

# - 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


本文出自 “yiyi” 博客,请务必保留此出处http://heyiyi.blog.51cto.com/205455/1872704

以上是关于PostgreSQL9.6 服务器参数配置的主要内容,如果未能解决你的问题,请参考以下文章

CentOS7安装配置PostgreSQL9.6

postgresql9.6安装

解决重置PostgreSQL 9.6密码的问题

PostgreSQL9.6新功能

centos6.6 + postgreSQL9.6

centos73 postgresql9.6.2rpm 安装