Database Size
|
Setting
|
Recommended Value
|
---|---|---|
Initial configuration
for most databases
|
shared_buffers
|
256 MB
|
work_mem
|
2 MB
|
|
maintenance_work_mem
|
64 MB
|
|
wal_buffers
|
16 MB
|
|
checkpoint_segments
|
16
|
|
effective_cache_size
|
2 GB
|
|
checkpoint_completion_target
|
0.9
|
|
max_connections
|
256
|
|
Small
|
shared_buffers
|
32 MB
|
work_mem
|
1 MB
|
|
maintenance_work_mem
|
16 MB
|
|
wal_buffers
|
not applicable
|
|
checkpoint_segments
|
8
|
|
effective_cache_size
|
128 MB
|
|
checkpoint_completion_target
|
0.5
|
|
max_connections
|
100
|
|
max_prepared_transactions
|
100
|
|
Medium
|
shared_buffers
|
256MB
|
work_mem
|
2MB
|
|
maintenance_work_mem
|
64 MB
|
|
wal_buffers
|
16 MB
|
|
checkpoint_segments
|
16
|
|
effective_cache_size
|
2 GB
|
|
checkpoint_completion_target
|
0.9
|
|
max_connections
|
256
|
|
max_prepared_transactions
|
256
|
|
Large
Note: For additional
parameters to consider, see Large Database Considerations.
|
shared_buffers
|
4 GB
|
work_mem
|
16 GB
|
|
maintenance_work_mem
|
128 MB
|
|
wal_buffers
|
16 MB
|
|
checkpoint_segments
|
32
|
|
effective_cache_size
|
4 GB
|
|
checkpoint_completion_target
|
0.9
|
|
max_connections
|
512
|
|
max_prepared_transactions
|
500
|
work_mem
. Keep
this in mind when choosing the value for this parameter. Set this
parameter between 16 MB and 64 MB or more, for a specialized use case
(for example, frequent very large sorts).