---
title: >-
  PostgreSQL instances should have the 'log_error_verbosity' flag set to
  'DEFAULT' or stricter
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > PostgreSQL instances should have the
  'log_error_verbosity' flag set to 'DEFAULT' or stricter
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# PostgreSQL instances should have the 'log_error_verbosity' flag set to 'DEFAULT' or stricter
 
## Description{% #description %}

This rule fails when a Cloud SQL for PostgreSQL instance sets the `log_error_verbosity` flag to a value other than `DEFAULT` or `TERSE`, such as `VERBOSE`, or sets the flag without a value. `VERBOSE` adds the `SQLSTATE` error code and the source file name, function name, and line number to each logged error, which is more detail than the CIS benchmark recommends. `TERSE` is stricter than `DEFAULT` and passes. An instance that does not set the flag passes, because PostgreSQL uses `DEFAULT`. Instances running other database engines are skipped, and an instance with no database version fails because its engine cannot be determined. A database flag with no name also fails, because it could be `log_error_verbosity`.

## Remediation{% #remediation %}

1. Set the `log_error_verbosity` flag to `DEFAULT` or `TERSE` on the flagged instance, or remove the flag, by following [Configure database flags](https://docs.cloud.google.com/sql/docs/postgres/flags).

## References{% #references %}

- [PostgreSQL log_error_verbosity](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-ERROR-VERBOSITY)
- [CIS Google Cloud Platform Foundation Benchmark](https://www.cisecurity.org/benchmark/google_cloud_computing_platform)
