PostgreSQL9.6 服务器参数配置

前端之家收集整理的这篇文章主要介绍了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

原文链接:https://www.f2er.com/postgresql/194277.html

猜你在找的Postgre SQL相关文章