Planner’s estimate of total cache available (OS + shared_buffers).
At a glance
| Property | Value |
|---|---|
| Parameter | effective_cache_size |
| Category | Query Planner |
| Default | 4GB |
| Value type | memory (kB/MB/GB) |
| Change scope | Per-session (SET) |
What it does
An advisory hint to the planner about how much memory is available for disk caching by both PostgreSQL and the OS. It does not allocate anything; it influences index-vs-seqscan decisions.
How to apply a change
Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.
Inspect the current value and source with SHOW effective_cache_size; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'effective_cache_size';.
Tuning guidance
Set to roughly 50-75% of system RAM. A realistic (higher) value makes the planner favor index scans, which is usually correct on cached working sets.