# You can use https://pgtune.leopard.in.ua to tune this for your system.
# DB Version: 16
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 12 GB
# CPUs num: 16
# Data Storage: ssd

max_connections = 200
shared_buffers = 3GB
effective_cache_size = 9GB
maintenance_work_mem = 768MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 3932kB
huge_pages = try
min_wal_size = 1GB
max_wal_size = 8GB
max_worker_processes = 16
max_parallel_workers_per_gather = 4
max_parallel_workers = 16
max_parallel_maintenance_workers = 4

# Listen address
listen_addresses = '*'

# Logging
session_preload_libraries = auto_explain
auto_explain.log_min_duration = 5ms
auto_explain.log_analyze = true
auto_explain.log_triggers = true
track_activity_query_size = 1048576
