Ensure that the "log_executor_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 "log_planner_stats" flag enables a crude profiling method for logging PostgreSQL executor performance statistics. The PostgreSQL executor is responsible to execute the plan handed over by the PostgreSQL planner/optimizer. The task of the PostgreSQL planner/optimizer is to create an optimal execution plan.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
excellence
Even though logging PostgreSQL executor 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_executor_stats" flag is disabled for your Google Cloud PostgreSQL database instances, perform the following actions:
Remediation / Resolution
To turn off the "log_executor_stats" database flag for your Google Cloud PostgreSQL database instances, perform the following actions:
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