work_mem

A configuration parameter specifying the maximum amount of memory available for internal sort operations and hash tables

work_mem is a configuration parameter specifying the maximum amount of memory available for internal sort operations and hash tables, beyond which the operations will spill to disk (and risk becoming considerably slower).

work_mem was added in PostgreSQL 8.0, replacing sort_mem.

Default value

Default value for work_mem is:

Changes to work_mem require a reload to take effect and are effective immediately for all backends.

Change history

Categories

GUC configuration item, Memory

See also

maintenance_work_mem, hash_mem_multiplier