Ensure that the "log_parser_stats" database flag is turned off for your Google Cloud PostgreSQL database instances in order to avoid any performance issues caused by excessive logging. The PostgreSQL planner (PostgreSQL optimizer) is responsible to parse and verify the syntax of each query received by the database server. If the syntax is correct a parse tree is built up, otherwise an error is generated. The "log_parser_stats" flag controls the inclusion of parser performance statistics within PostgreSQL logs for each query made to the database.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
excellence
The "log_parser_stats" database flag enables a crude profiling method for logging PostgreSQL parser performance statistics. Even though logging parser performance statistics can be useful for troubleshooting purposes, it may significantly increase the amount of logs and cause performance overhead.
Note: Some database flag settings can affect instance availability and/or stability, and eventually remove the PostgreSQL instance from the Google Cloud SQL Service Level Agreement (SLA).
Audit
To determine if the "log_parser_stats" flag is disabled for your Google Cloud PostgreSQL database instances, perform the following operations:
Remediation / Resolution
To disable the "log_parser_stats" database flag for your Google Cloud PostgreSQL database instances, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Cloud SQL for PostgreSQL documentation
- Configure database flags
- Edit instances
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud sql instances list
- gcloud sql instances describe
- gcloud sql instances patch
Unlock the Remediation Steps
Free 30-day Trial
Automatically audit your configurations with Conformity
and gain access to our cloud security platform.
You are auditing:
Disable 'log_parser_stats' Flag for PostgreSQL Database Instances
Risk Level: Medium