Compliancemanzill.com
CIS Google Cloud Platform Foundation Benchmark v1.2.0

CIS Google Cloud Platform Foundation Benchmark v1.2.0/Cloud SQL Database Services - PostgreSQL Database/69 of 83

6.2.16Ensure that the 'log_min_duration_statement' database flag for Cloud SQL PostgreSQL instance is set to '-1' (disabled)

Control family: Cloud SQL Database Services - PostgreSQL Database

Control description

The `log_min_duration_statement` flag defines the minimum amount of execution time of a statement in milliseconds where the total duration of the statement is logged. Ensure that `log_min_duration_statement` is disabled, i.e., a value of `-1` is set.

How to implement

ResponsibilityCustomerYou configure and operate this in your own cloud accounts.

This flag logs the full text of statements that run longer than a given time. Statement text can contain sensitive values, so the benchmark wants it switched off with -1, relying on log_duration (6.2.5) for timings instead.

Before you start

The same on every cloud, before the steps in the tabs.

  • Record in the PostgreSQL configuration standard that log_min_duration_statement is -1, so every new instance starts with it.
  • Use log_duration (6.2.5) for timings instead, so statement text with sensitive values isn't logged.

Evidence

  • The PostgreSQL configuration standard

On Google Cloud the tasks set the flag on each PostgreSQL instance in Cloud SQL, then watch for instances without it with Security Command Center.

Task 1Set log_min_duration_statement to -1 on each PostgreSQL instance

  1. Sign in to the Google Cloud console at console.cloud.google.com and open SQL.
  2. Choose the PostgreSQL instance and select Edit.
  3. Expand Database flags (shown as Flags on some instances) and choose Add a database flag, or find the flag if it is already listed.
  4. Choose log_min_duration_statement and set it to -1, then choose Done.
  5. Choose Save; if the console says the change restarts the instance, schedule it for a quiet period first.
  6. Check it: the instance Overview lists log_min_duration_statement with the value -1 under Database flags.

Task 2Keep it checked with the Security Health Analytics finding SQL_LOG_MIN_DURATION_STATEMENT_ENABLED

  1. Open Security Command Center > Findings for the organization (Security Health Analytics runs on the Premium tier for most detectors).
  2. In the query editor, filter on category SQL_LOG_MIN_DURATION_STATEMENT_ENABLED with state ACTIVE, and select Apply.
  3. Open each finding, read the resource and the explanation it gives, and set the flag on the instance it names.
  4. Check it: after the next Security Health Analytics scan, no active SQL_LOG_MIN_DURATION_STATEMENT_ENABLED finding remains.

Evidence

  • The Overview of each PostgreSQL instance, listing log_min_duration_statement set to -1 under Database flags
  • Security Command Center, with no active SQL_LOG_MIN_DURATION_STATEMENT_ENABLED finding

Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.