Tune
| Setting | Value |
|---|---|
| max_connections | 200 |
| shared_buffers | 4GB |
| effective_cache_size | 12GB |
| maintenance_work_mem | 1GB |
| checkpoint_completion_target | 0.9 |
| wal_buffers | 16MB |
| default_statistics_target | 100 |
| random_page_cost | 1.1 |
| effective_io_concurrency | 200 |
| work_mem | 20MB |
| huge_pages | try |
| min_wal_size | 1GB |
| max_wal_size | 4GB |
Check out PgTune for recommendations. DB version is 18.