Per-session memory for temporary tables.
At a glance
| Property | Value |
|---|---|
| Parameter | temp_buffers |
| Category | Memory |
| Default | 8MB |
| Value type | memory (kB/MB/GB) |
| Change scope | Per-session (SET) |
What it does
Maximum memory a session uses for temporary-table buffers, allocated on first use and freed at session end.
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 temp_buffers; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'temp_buffers';.
Tuning guidance
Raise per-session before heavy temporary-table workloads; the default suits most OLTP.