22# CONNECTIONS AND AUTHENTICATION
33#------------------------------------------------------------------------------
44listen_addresses = '*' # Allow connections from any network interface
5- max_connections = 200 # Increase if you expect more concurrent connections
5+ max_connections = 300 # 4 Tegola replicas × 56 conn + refresh/imposm headroom
66superuser_reserved_connections = 5 # Reserve connections for superusers
77
88#------------------------------------------------------------------------------
99# RESOURCE USAGE
1010#------------------------------------------------------------------------------
1111
1212# - Memory Configuration -
13- shared_buffers = 10GB # ~25 % of 40GB container limit
14- work_mem = 256MB # Memory for each sort/hash operation; be cautious with many parallel queries
15- maintenance_work_mem = 4GB # Larger memory for VACUUM / CREATE INDEX / ALTER
16- effective_cache_size = 26GB # ~65% of 40GB container limit
13+ shared_buffers = 16GB # ~13 % of 125GB RAM
14+ work_mem = 256MB # Memory for each sort/hash operation; balanced for 300 max connections
15+ maintenance_work_mem = 8GB # Larger memory for VACUUM / CREATE INDEX / ALTER / REFRESH
16+ effective_cache_size = 80GB # ~65% of 125GB RAM
1717
1818# - Disk Optimization for SSD (if using SSD) -
1919random_page_cost = 1.0 # Lower cost for random I/O on SSD
@@ -32,7 +32,7 @@ synchronous_commit = off # Improves write performance, risk of
3232#------------------------------------------------------------------------------
3333# AUTOVACUUM SETTINGS
3434#------------------------------------------------------------------------------
35- autovacuum_max_workers = 6 # More parallel vacuum workers for busy systems
35+ autovacuum_max_workers = 8 # More parallel vacuum workers for busy systems
3636autovacuum_naptime = 30s # How often the autovacuum daemon checks for work
3737autovacuum_vacuum_cost_limit = -1 # Let PostgreSQL adjust vacuum cost dynamically
3838
@@ -42,26 +42,27 @@ autovacuum_vacuum_cost_limit = -1 # Let PostgreSQL adjust vacuum cost d
4242effective_io_concurrency = 300 # For SSD; helps the planner estimate IO concurrency
4343parallel_tuple_cost = 0.001 # Lower cost to encourage parallelization
4444parallel_setup_cost = 100 # Lower to encourage more parallel plans
45- max_worker_processes = 25 # Match 25 CPUs container limit
46- max_parallel_workers_per_gather = 6 # Max workers that can help a single query
47- max_parallel_workers = 25 # Total number of parallel workers across all queries
45+ max_worker_processes = 36 # Match 36 CPUs
46+ max_parallel_workers_per_gather = 8 # Max workers that can help a single query
47+ max_parallel_workers = 36 # Total number of parallel workers across all queries
4848
4949#------------------------------------------------------------------------------
5050# LOGGING
5151#------------------------------------------------------------------------------
5252logging_collector = off # Disable log collection
53+ log_min_messages = fatal # Only log FATAL and PANIC (crashes, OOM kills)
54+ log_min_error_statement = panic # Do not log SQL statements even on errors
5355log_statement = 'none' # Do not log any statements
5456log_duration = off # Disable logging query duration
5557log_min_duration_statement = -1 # Disable logging slow queries
56- log_error_verbosity = terse # Minimal error messages
58+ log_error_verbosity = default # Show enough detail for debugging errors
5759log_autovacuum_min_duration = -1 # Do not log autovacuum runs
58- log_connections = on # Do not log new connections
59- log_disconnections = on # Do not log disconnections
60+ log_connections = off # Do not log connections
61+ log_disconnections = off # Do not log disconnections
6062log_lock_waits = off # Do not log lock waits
6163log_temp_files = -1 # Do not log temporary file creation
6264log_checkpoints = off # Do not log checkpoints
6365log_replication_commands = off # Do not log replication-related commands
64- log_directory = '/dev/null' # Redirect logs to /dev/null (no storage)
6566#------------------------------------------------------------------------------
6667# CLIENT CONNECTION DEFAULTS
6768#------------------------------------------------------------------------------
0 commit comments