More Info:

Ensure that the log_min_messages database flag for Cloud SQL PostgreSQL instance is set appropriately.

Risk Level

Low

Address

Security

Compliance Standards

CISGCP, CBP

Triage and Remediation

Remediation

To remediate the PostgreSQL log_min_messages flag misconfiguration in GCP, you can follow the below steps using the GCP console:

  1. Open the Cloud SQL instances page in the GCP console.
  2. Select the instance that you want to remediate.
  3. Click on the “Edit” button at the top of the page.
  4. Scroll down to the “Flags” section and click on “Add item”.
  5. In the “Flag name” field, enter “log_min_messages”.
  6. In the “Flag value” field, enter “WARNING”.
  7. Click on the “Save” button at the bottom of the page to save the changes.

This will set the log_min_messages flag to “WARNING” which will ensure that only warning messages and above are logged in the PostgreSQL logs.