Ensure that "log_checkpoints" database flag is enabled for all PostgreSQL database instances available within your Google Cloud Platform (GCP) account. The "log_checkpoints" PostgreSQL flag allows checkpoints and restart points to be logged in the PostgreSQL server log. By default, the "log_checkpoints" flag is disabled.
PostgreSQL database checkpoints are usually disrupting your database performance and can cause connections to stall for up to a few seconds while they occur. By enabling the "log_checkpoints" flag you can get verbose logging of the checkpoint process for your PostgreSQL database servers. The log messages include statistics such as the number of buffers written and the time spent writing them, therefore the logging data can be used to identify and troubleshoot sub-optimal PostgreSQL database performance.
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).
To determine if the "log_checkpoints" flag is enabled for your PostgreSQL database instances, perform the following actions:
Remediation / Resolution
To turn on the "log_checkpoints" database flag for your Google Cloud Platform (GCP) PostgreSQL database instances, perform the following operations:
- Google Cloud Platform (GCP) Documentation
- Cloud SQL for PostgreSQL
- Configuring database flags
- Editing instances
- PostgreSQL Database Documentation
- 19.8. Error Reporting and Logging
Unlock the Remediation Steps
Gain free unlimited access
to our full Knowledge Base
Over 750 rules & best practices
Get started for FREE
You are auditing:
Enable "log_checkpoints" Flag for PostgreSQL Database Server Configuration
Risk level: Medium