Configuration parameter

log_temp_files — PostgreSQL Configuration Parameter

Category Logging Default -1 Unit memory (kB/MB/GB) Change scope Superuser / reload

Log temporary files at least this large.

At a glance

Property Value
Parameter log_temp_files
Category Logging
Default -1
Value type memory (kB/MB/GB)
Change scope Superuser / reload

What it does

Logs the creation of temporary files (from sorts/hashes) at or above the given size. 0 logs all, -1 disables.

How to apply a change

Can be changed at runtime by a superuser for the current session, or globally via reload.

Inspect the current value and source with SHOW log_temp_files; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'log_temp_files';.

Tuning guidance

Set to a few MB to detect queries spilling to disk because work_mem is too low — a direct signal for memory tuning.

Reference

PostgreSQL documentation — Logging configuration.

Was this helpful?

← All configuration parameters