Guidelines for PostgreSQL

Suggested Parameters

When running a PostgreSQL optimization, consider starting from these recommendations:

Parameter
Recommendation

pg_max_connections

Keep its value under 1000 connections.

pg_effective_cache_size

75% of physical available memory to PostgreSQL.

pg_maintenance_work_mem

12% of physical available memory to PostgreSQL.

pg_max_wal_senders

Max replicas you expect to have, doubled.

pg_max_parallel_workers

Number of cores divided by 2.

pg_shared_buffers

25% of physical available memory to PostgreSQL.

Last updated