↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Configuration Parameters

temp_buffers

Sets the maximum amount of memory used for temporary buffers within each database session. These are session-local buffers used only for access to temporary tables. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is eight megabytes (8MB). (If BLCKSZ is not 8kB, the default value scales proportionally to it.) This setting can be changed within individual sessions, but only before the first use of temporary tables within the session; subsequent attempts to change the value will have no effect on that session. A session will allocate temporary buffers as needed up to the limit given by temp_buffers. The cost of setting a large value in sessions that do not actually need many temporary buffers is only a buffer descriptor, or about 64 bytes, per increment in temp_buffers. However if a buffer is actually used an additional 8192 bytes will be consumed for it (or in general, BLCKSZ bytes).

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

boot val
1024
category
Resource Usage / Memory
context
user
documented
true
enumvals
Unknown
extra desc
Unknown
lang
en
max val
1073741823
metadata version
18
min val
100
name
temp_buffers
short desc
Sets the maximum number of temporary buffers used by each session.
source
pg-settings-source-snapshot
unit
8kB
vartype
integer

Definition PG 18

Sets the maximum amount of memory used for temporary buffers within each database session. These are session-local buffers used only for access to temporary tables. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is eight megabytes (8MB). (If BLCKSZ is not 8kB, the default value scales proportionally to it.) This setting can be changed within individual sessions, but only before the first use of temporary tables within the session; subsequent attempts to change the value will have no effect on that session. A session will allocate temporary buffers as needed up to the limit given by temp_buffers. The cost of setting a large value in sessions that do not actually need many temporary buffers is only a buffer descriptor, or about 64 bytes, per increment in temp_buffers. However if a buffer is actually used an additional 8192 bytes will be consumed for it (or in general, BLCKSZ bytes).

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:9d32c6ca3960de9337725a4b694a971a387a8ce62285ea34a66fa76c7da6e19d

Text language: en · wiki-repair-20261023:9d32c6ca3960de9337725a4b694a971a387a8ce62285ea34a66fa76c7da6e19d