Google Cloud Compliance ControlsGoogle Cloud SQL
Cloud SQL PostgreSQL instances should have 'log_temp_files' set to '0'
Checks that Cloud SQL PostgreSQL instances have the `log_temp_files` database flag set to `0`. Temporary files are not logged by default, and setting `log_temp_files` to `0` makes the instance log all temporary files.
What this control checks
Cloud SQL PostgreSQL log_temp_files database flag must be set to 0.
Framework mappings
The clauses this control is mapped to in each framework.
- 6.2.15 Ensure that the 'log_temp_files' database flag for Cloud SQL PostgreSQL instance is set to '0'
Related controls
- Cloud SQL PostgreSQL instances should have 'log_duration' set to 'on'
- Cloud SQL PostgreSQL instances should have 'log_connections' set to 'on'
- Cloud SQL PostgreSQL instances should have 'log_min_duration_statement' set to '-1' (disabled)
- Cloud SQL PostgreSQL instances should have 'log_error_verbosity' set to 'DEFAULT' or stricter
Tool mappings
Use these identifiers to cross-reference this control across tools, reports, and evidence.
- Compliance.tf Control:
sql_instance_postgresql_log_temp_files_database_flag_0 - Powerpipe Control:
gcp_compliance.control.sql_instance_postgresql_log_temp_files_database_flag_0 - Trivy Check:
GCP-0014
Last reviewed: 2026-10-10