-
Notifications
You must be signed in to change notification settings - Fork 1
/
postgresql.conf
24 lines (24 loc) · 1.23 KB
/
postgresql.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Memory Configuration
work_mem = 1GB # Increased for better query performance
shared_buffers = 4GB # Kept high to buffer more writes
maintenance_work_mem = 256MB # For maintenance operations
effective_cache_size = 4GB # Adjust based on available system memory
# Background Writer
bgwriter_delay = 10ms # 10ms per round
bgwriter_lru_maxpages = 10000 # 8MB (1k pages) per round (800MB / s)
bgwriter_lru_multiplier = 1.0 # High spike param to keep up with write load
# Checkpoints
log_checkpoints = on # To monitor checkpoint behavior
checkpoint_timeout = 10min # Longer interval between forced checkpoints
checkpoint_completion_target = 0.9 # Spread checkpoint I/O over more time
# WAL
max_wal_size = 256MB # Increased to allow more WAL between checkpoints
min_wal_size = 80MB # Minimum size of WAL before recycling
wal_buffers = 32MB # Helps buffer WAL writes
wal_writer_delay = 10ms # Decreased for more frequent WAL writes
wal_writer_flush_after = 1MB # Flush WAL every 1MB
# UNLOGGED table specific
fsync = off # Just don't crash, bro
synchronous_commit = off # Just don't crash, bro
full_page_writes = off # Not needed for UNLOGGED tables
autovacuum = off