temp_file_limit
A server parameter determining how much space can be used for temporary files
temp_file_limit
is a configuration parameter determining the maximum amount of disk space that a process can use for temporary files.
temp_file_limit
was added in PostgreSQL 9.2.
Default value
The default value for temp_file_limit
is: -1
(no limit)
Usage
If a non-zero value is set for temp_file_limit
, any transaction which generates temporary files exceeding that size will be cancelled.
Note that if the value for temp_file_limit
is set without specifying units, it is assumed to be in kilobytes.
Change history
- PostgreSQL 9.2
- added (commit 23e5b16c)
Examples
Executing a transaction which generates temporary files exceeding the (artificially low) setting of 1kb:
postgres=# SELECT * FROM foo f JOIN foo g ON f.id = g.id; ERROR: temporary file size exceeds temp_file_limit (1kB)
References
- PostgreSQL documentation: temp_file_limit