Type: | integer |
Default: | -1 (-1) |
Min: | -1 (-1) |
Max: | 2147483647 (2147483647kB) |
Unit: | KB |
Context: | superuser |
Restart: | false |
Since: | 9.2 |
Specifies the maximum amount of disk space that a process can use for temporary files, such as sort and hash temporary files, or the storage file for a held cursor. A transaction attempting to exceed this limit will be canceled. If this value is specified without units, it is taken as kilobytes. -1
(the default) means no limit. Only superusers can change this setting.
This setting constrains the total space used at any instant by all temporary files used by a given PostgreSQL process. It should be noted that disk space used for explicit temporary tables, as opposed to temporary files used behind-the-scenes in query execution, does not count against this limit.
Recommendations
… or something which is bigger than your largest possible sort, but not big enough to run you out of disk space.
On StackOverflow
On pgsql-hackers
- Re: max_slot_wal_keep_size comment in postgresql.conf
- [PATCH] New default role allowing to change per-role/database settings
- Re: Default setting for enable_hashagg_disk
- Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
- Re: [PATCH] New default role allowing to change per-role/database settings