Logging and monitoring

PostgreSQL instance where ‘log_temp_files’ flag value isn’t set to 0

Risk Level

Informational (4)

Platform(s)
Compliance Frameworks

Description

PostgreSQL can create a temporary file for actions such as sorting, hashing and temporary query results when these operations exceed work_mem. Configuring log_temp_files to 0 causes all temporary file information to be logged. If all temporary files are not logged, it may be more difficult to identify potential performance issues that may be due to either poor application coding or deliberate resource starvation attempts.
  • Recommended Mitigation

    Add the following database flag: 'log_temp_files=0'