The "default" postgresql.conf, step by step
summary
Step-by-step, the default postgresql.conf gets concrete, actionable settings: shared_buffers = ~25% of RAM (or much higher only if DB fully fits RAM), max_connections ~100–200 with 5–10 superuser reserve, enable huge_pages when using large shared_buffers, set checkpoint_completion_target = 0.9 and checkpoint timeout ≈ 1 hour, tune work_mem (~100MB baseline) and autovacuum (threshold 50 rows or 5%, autovacuum_max_workers up to ~10), prefer effective_cache_size ≈ 2×shared_buffers, enable pg_stat_statements and sensible logging. These choices reflect multi-client practical experience.
AI-written summary · about
chapters (29)
- 0:00Welcome and introduction
- 1:56PostgreSQL conf overview
- 9:06Editing postgresql.conf safely
- 10:53Listen address and security
- 12:19Max connections and process limits
- 15:11TCP keepalive settings
- 15:33Shared buffers basics
- 20:14Huge pages explained
- 25:34Configuring huge pages in Linux
- 27:44Work memory settings
- 31:14Maintenance work memory
- 32:58Auto vacuum work memory
- 34:00Auto vacuum cost limits
- 34:44WAL and checkpoint basics
- 36:32Checkpoint timeout settings
- 37:55Max WAL size and recovery
- 38:59Checkpoint completion target
- 40:26Background writer tuning
- 41:51Effective I/O concurrency
- 43:15Effective cache size
- 44:40Default statistics target
- 45:02Auto vacuum deep dive
- 46:29Auto vacuum threshold settings
- 47:14Auto vacuum nap time and workers
- 48:37Auto vacuum analyze settings
- 49:42Transaction ID wraparound
- 54:14Logging configuration
- 57:25pg_stat_statements setup
- 58:31Q&A and closing
