CIS Google Cloud Platform Foundation Benchmark v1.2.0/Cloud SQL Database Services - PostgreSQL Database/66 of 83
6.2.13Ensure that the 'log_min_messages' database flag for Cloud SQL PostgreSQL instance is set appropriately
Control family: Cloud SQL Database Services - PostgreSQL Database
Control description
The `log_min_messages` flag defines the minimum message severity level that is considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`.
Each severity level includes the subsequent levels mentioned above.
Note: To effectively turn off logging failing statements, set this parameter to PANIC.
ERROR is considered the best practice setting. Changes should only be made in accordance with the organization's logging policy.
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
This flag sets the lowest severity of message written to the log. Set too high and warnings that precede an incident are lost; set too low and the log fills with debug noise. The CIS text suggests error; Google's check and later CIS versions expect warning or more detail, which keeps warnings too. Choose per your logging policy.
Before you start
The same on every cloud, before the steps in the tabs.
- Record in the PostgreSQL configuration standard the log_min_messages value (warning, or as your logging policy sets), and why, so every new instance starts with it.
- Record the choice against the v1.2 text, which suggested error.
Evidence
- The PostgreSQL configuration standard
Not applicable. This benchmark covers Google Cloud only.
Not applicable. This benchmark covers Google Cloud only.
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_messages to warning on each PostgreSQL instance
- Sign in to the Google Cloud console at console.cloud.google.com and open SQL.
- Choose the PostgreSQL instance and select Edit.
- Expand Database flags (shown as Flags on some instances) and choose Add a database flag, or find the flag if it is already listed.
- Choose log_min_messages and set it to warning, then choose Done.
- Choose Save; if the console says the change restarts the instance, schedule it for a quiet period first.
- Check it: the instance Overview lists log_min_messages with the value warning under Database flags.
Task 2Keep it checked with the Security Health Analytics finding SQL_LOG_MIN_MESSAGES
- Open Security Command Center > Findings for the organization (Security Health Analytics runs on the Premium tier for most detectors).
- In the query editor, filter on category SQL_LOG_MIN_MESSAGES with state ACTIVE, and select Apply.
- Open each finding, read the resource and the explanation it gives, and set the flag on the instance it names.
- Check it: after the next Security Health Analytics scan, no active SQL_LOG_MIN_MESSAGES finding remains.
Evidence
- The Overview of each PostgreSQL instance, listing log_min_messages set to warning under Database flags
- Security Command Center, with no active SQL_LOG_MIN_MESSAGES 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.