diff --git a/en/google/sql/postgresql-log-planner-stats.md b/en/google/sql/postgresql-log-planner-stats.md new file mode 100644 index 000000000..196d38d59 --- /dev/null +++ b/en/google/sql/postgresql-log-planner-stats.md @@ -0,0 +1,25 @@ +[![CloudSploit](https://cloudsploit.com/img/logo-new-big-text-100.png "CloudSploit")](https://cloudsploit.com) + +# GOOGLE / SQL / PostgreSQL Log Planner Stats Disabled + +## Quick Info + +| | | +|-|-| +| **Plugin Title** | PostgreSQL Log Planner Stats Disabled | +| **Cloud** | GOOGLE | +| **Category** | SQL | +| **Description** | Ensures SQL instances for PostgreSQL type have log_planner_stats flag set to "off". | +| **More Info** | Logging planner performance statistics can lead to an increased amount of logs and can impact performance. It is recommended that the "log_planner_stats" flag is set to off to avoid performance issues caused by excessive logging. | +| **GOOGLE Link** | https://cloud.google.com/sql/docs/postgres/flags | +| **Recommended Action** | Ensure that log_planner_stats flag is disabled for all PostgreSQL instances. | + +## Detailed Remediation Steps +1. Log into the Google Cloud Platform Console. +2. Scroll down the left navigation panel and click on "SQL".
+3. On the "SQL" page, click on the three dots next to the name of the PostgreSQL Instance which needs to be verified whether it has the log_planner_stats flag enabled or not and click on "Edit".
+4. On the "Edit" instance page, scroll down and click on the arrow next to the "Flags" section and check if the log_planner_stats flag is set to "on". If the value is not set, the PostgreSQL instance has the log_planner_stats flag disabled.
+5. Repeat steps number 3-4 to check other PostgreSQL Instances in the project.
+6. Navigate to "SQL" and click on it. Click on the three dots next to the name of the PostgreSQL Instance which has log_planner_stats flag enabled and click "Edit".
+7. On the Edit Instance page, scroll down to the Flags section, expand it and set the value for log_planner_stats flag to "off" or click on the trash icon to remove it altogether. Then click "Save".
+8. Repeat steps number 7-8 to disable log_planner_stats flag for all other PostgreSQL Instances in the project.
diff --git a/resources/google/sql/postgresql-log-planner-stats/step2.png b/resources/google/sql/postgresql-log-planner-stats/step2.png new file mode 100644 index 000000000..a481a055e Binary files /dev/null and b/resources/google/sql/postgresql-log-planner-stats/step2.png differ diff --git a/resources/google/sql/postgresql-log-planner-stats/step3.png b/resources/google/sql/postgresql-log-planner-stats/step3.png new file mode 100644 index 000000000..c47f3e30f Binary files /dev/null and b/resources/google/sql/postgresql-log-planner-stats/step3.png differ diff --git a/resources/google/sql/postgresql-log-planner-stats/step4.png b/resources/google/sql/postgresql-log-planner-stats/step4.png new file mode 100644 index 000000000..bb975d9d5 Binary files /dev/null and b/resources/google/sql/postgresql-log-planner-stats/step4.png differ diff --git a/resources/google/sql/postgresql-log-planner-stats/step7.png b/resources/google/sql/postgresql-log-planner-stats/step7.png new file mode 100644 index 000000000..5e9e4bcb1 Binary files /dev/null and b/resources/google/sql/postgresql-log-planner-stats/step7.png differ