@@ -11,10 +11,10 @@ superuser_reserved_connections = 2 # Reserve a few connections for superus
1111#------------------------------------------------------------------------------
1212
1313# - Memory Configuration -
14- shared_buffers = 1GB # ~25% of total memory for PostgreSQL caching
15- work_mem = 32MB # Lower memory per query to fit within 4GB RAM
16- maintenance_work_mem = 256MB # Allocate memory for maintenance tasks like VACUUM
17- effective_cache_size = 2GB # 50% of total memory for query planner caching
14+ shared_buffers = 4GB # Conservative, shares server with production
15+ work_mem = 256MB # Enough for import sorting
16+ maintenance_work_mem = 4GB # For CREATE INDEX during import
17+ effective_cache_size = 16GB # Conservative estimate sharing with production
1818
1919# - Disk Optimization for SSD -
2020random_page_cost = 1.0 # Optimize for SSD storage
@@ -35,20 +35,20 @@ synchronous_commit = off # Improve performance by reducing commi
3535# AUTOVACUUM SETTINGS
3636#------------------------------------------------------------------------------
3737
38- autovacuum_max_workers = 2 # Limit autovacuum workers due to lower memory
38+ autovacuum_max_workers = 3 # Conservative, shares server with production
3939autovacuum_naptime = 1min # Run autovacuum more frequently
4040autovacuum_vacuum_cost_limit = -1 # Allow PostgreSQL to auto-adjust vacuum cost
4141
4242#------------------------------------------------------------------------------
4343# QUERY TUNING
4444#------------------------------------------------------------------------------
4545
46- effective_io_concurrency = 100 # Reduce IO concurrency to fit within staging constraints
46+ effective_io_concurrency = 300 # For SSD
4747parallel_tuple_cost = 0.001 # Encourage parallel execution
4848parallel_setup_cost = 100 # Lower parallel setup cost
49- max_worker_processes = 4 # Limit worker processes to available CPU cores
50- max_parallel_workers_per_gather = 4 # Allow more per-query parallel workers
51- max_parallel_workers = 4 # Total parallel workers for staging
49+ max_worker_processes = 6 # Conservative, shares server with production
50+ max_parallel_workers_per_gather = 4 # Max workers per query
51+ max_parallel_workers = 6 # Total parallel workers
5252
5353#------------------------------------------------------------------------------
5454# LOGGING
0 commit comments