More Info:

Auditing helps in troubleshooting operational problems and also permits forensic analysis. If log_min_error_statement is not set to the correct value, messages may not be classified as error messages appropriately. An organization will need to decide their own threshold for logging log_min_messages flag. This recommendation is applicable to PostgreSQL database instances.

Risk Level

Low

Address

Reliability, Security

Compliance Standards

CISGCP, CBP

Triage and Remediation

Remediation

To remediate the PostgreSQL Log Min Error Statement Flag Should Be Error Or Stricter misconfiguration for GCP using GCP console, please follow the below steps:

  1. Login to GCP console.
  2. Navigate to the Cloud SQL instances page.
  3. Select the instance for which you want to remediate the misconfiguration.
  4. Click on the “Edit” button at the top of the page.
  5. Scroll down to the “Flags” section.
  6. Click on the “Add item” button.
  7. In the “Name” field, enter “log_min_error_statement”.
  8. In the “Value” field, enter “error”.
  9. Click on the “Save” button at the bottom of the page.

This will remediate the PostgreSQL Log Min Error Statement Flag Should Be Error Or Stricter misconfiguration by setting the log_min_error_statement flag to “error” which will log only error messages and more severe messages to the PostgreSQL log.

Additional Reading: