Cloud SQL PostgreSQL instances should have 'log_statement_stats' set to 'off'
The log_statement_stats flag controls the inclusion of end-to-end performance statistics of a SQL query in the PostgreSQL logs for each query. This cannot be enabled with other module statistics (log_parser_stats, log_planner_stats, log_executor_stats).
The log_statement_stats flag controls the inclusion of end-to-end performance statistics of a SQL query in the PostgreSQL logs for each query.
What this control checks
Cloud SQL PostgreSQL instances must have the log_statement_stats database flag set to off.
Common pitfalls
Not allowed alongside the per-module statistics flags
log_statement_stats cannot be enabled with other module statistics (log_parser_stats, log_planner_stats, log_executor_stats).
Audit evidence
Evidence that deployed resources meet this control: PowerPipe control gcp_compliance.control.sql_instance_postgresql_log_statement_stats_database_flag_off.
Framework-specific interpretation
CIS GCP Benchmark v1.2.0: Mapped to 6.2.12 (Ensure 'log_statement_stats' database flag for Cloud SQL PostgreSQL instance is set to 'off').
Framework mappings
The clauses this control is mapped to in each framework.
- 6.2.12 Ensure 'log_statement_stats' database flag for Cloud SQL PostgreSQL instance is set to 'off'
Related controls
Tool mappings
Use these identifiers to cross-reference this control across tools, reports, and evidence.
- Compliance.tf Control:
sql_instance_postgresql_log_statement_stats_database_flag_off - Powerpipe Control:
gcp_compliance.control.sql_instance_postgresql_log_statement_stats_database_flag_off
Last reviewed: 2026-10-10