log_temp_files

A server parameter controlling whether to log temporary file deletion

log_temp_files is a configuration parameter determining whether to log information about deletion of temporary files.

log_temp_files was added in PostgreSQL 8.3.

Default value

The default value for  is: -1 (disabled).

Usage

If set to 0, deletion of all temporary files is logged.

If set to a value greater than 0, deletion information is logged about all temporary files which as as big are or greater than the specified value. This is assumed to be in kilobytes unless it is defined with a specific unit.

Change history

Examples

Example log output when log_temp_files is enabled:

[2021-12-16 09:19:21 UTC] psql postgres postgres STATEMENT:  SELECT * FROM foo f JOIN foo g ON f.id=g.id ORDER BY f.id;
[2021-12-16 09:19:21 UTC] psql postgres postgres LOG:  00000: temporary file: path "base/pgsql_tmp/pgsql_tmp25060.0.fileset/o1307of2048.p0.0", size 393216

Categories

Logging

See also

temp_file_limit