temp_file_limit
No restart — reload (superuser)tuned by pgconfiguratorsize (kB/MB); -1 unlimited
Caps how much temporary file space one process may use before its query is aborted.
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
When a query spills to disk (a big sort, hash, or CTE), it writes temp files. temp_file_limit caps the total temp space a single backend may use; exceed it and the query is cancelled. It's a guard against one runaway query filling the disk with temp files.
How to tune it
Set it (e.g. a few GB) on shared systems to stop a single bad query from exhausting disk. Make it generous enough for legitimate large reports. Pair with log_temp_files so you can see what's spilling and raise work_mem where it helps.
What the analyzer flags
- Sort spilled to disk
- HashAggregate touched temp files