<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf" -->

---
title: All Your GUCs in a Row: log_min_messages,...
description: A deep dive into three interlocking PostgreSQL configuration parameters that govern server-log output: log_min_messages (the severity floor, with its...
canonical: https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: All Your GUCs in a Row: log_min_messages, log_min_error_statement, and log_error_verbosity | daily.dev
og:description: A deep dive into three interlocking PostgreSQL configuration parameters that govern server-log output: log_min_messages (the severity floor, with its...
og:url: https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf
og:image: https://api.daily.dev/og/posts/VGXT2wBSf.png
og:image:alt: All Your GUCs in a Row: log_min_messages, log_min_error_statement, and log_error_verbosity
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# All Your GUCs in a Row: log_min_messages, log_min_error_statement, and log_error_verbosity

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 6 min read · 0 upvotes · 0 comments

## Summary

A deep dive into three interlocking PostgreSQL configuration parameters that govern server-log output: log_min_messages (the severity floor, with its counterintuitive ladder where LOG outranks ERROR), log_min_error_statement (which decides whether the triggering SQL is appended as a STATEMENT: line), and log_error_verbosity (which controls how many fields, like DETAIL, HINT, CONTEXT, and SQLSTATE/LOCATION, each entry prints). The piece walks through real sandbox testing on PostgreSQL 18.6, explains traps like setting log_min_messages to 'log' silently swallowing errors and warnings, and argues the shipped defaults (warning, error, default) are correct for most setups, with terse/panic reserved specifically for compliance scenarios where statement literals or DETAIL fields would leak customer data into logs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9ty>

## Questions this post answers

### Why does setting log_min_messages to 'log' in PostgreSQL make my errors disappear from the log?

Because LOG severity outranks ERROR in the log_min_messages severity ladder, unlike in client_min_messages. Setting log_min_messages = 'log' admits only LOG, FATAL, and PANIC messages, so ordinary ERROR and WARNING messages, including a division-by-zero error or a RAISE WARNING, are silently dropped from the server log while RAISE LOG messages still appear.

_Debugging a misconfigured Postgres log floor is easier with daily.dev surfacing deep dives on GUC quirks like this._

### How do I stop customer data from leaking into PostgreSQL error logs through STATEMENT and DETAIL lines?

Set log_min_error_statement to 'panic' so query text is never appended as a STATEMENT line, and set log_error_verbosity to 'terse' so DETAIL fields (which can include actual row values like a duplicate key) are dropped. Used together this pair is the one legitimate way to keep a compliance-sensitive log free of literals and table data, at the cost of losing the most useful debugging lines.

_Teams hardening database logs for compliance can track configuration trade-offs like this via daily.dev._

### What does log_error_verbosity = verbose add to PostgreSQL log messages compared to the default?

Verbose mode keeps everything the default level prints and adds the SQLSTATE code spliced in after the severity, for example ERROR: 23505, and a LOCATION line naming the C function, file, and line number that raised the message, such as _bt_check_unique, nbtinsert.c:666. This applies to every logged message, including routine notices, which can add noisy LOCATION lines forever.

_daily.dev helps engineers comparing verbose Postgres logging trade-offs stay on top of database tuning details._

## Similar posts on daily.dev

- [messages to be set per process type – select \* from depesz;](https://daily.dev/posts/messages-to-be-set-per-process-type-select-from-depesz--jfpuj6yrs) · depesz · 0 upvotes · 0 comments
- [All Your GUCs in a Row: log\_min\_duration\_sample, log\_statement\_sample\_rate, and log\_transaction\_sample\_rate](https://daily.dev/posts/all-your-gucs-in-a-row-log-min-duration-sample-log-statement-sample-rate-and-log-transaction-samp-q1podf82k) · Planet PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#postgresql](https://daily.dev/tags/postgresql), [#logging](https://daily.dev/tags/logging), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"All Your GUCs in a Row: log_min_messages, log_min_error_statement, and log_error_verbosity","url":"https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf"},"datePublished":"2026-08-31T01:01:39.486Z","dateModified":"2026-08-31T01:02:05.391Z","description":"A deep dive into three interlocking PostgreSQL configuration parameters that govern server-log output: log_min_messages (the severity floor, with its...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/693238ec16f5bec58988845e68ddcc90?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/693238ec16f5bec58988845e68ddcc90?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,postgresql,logging,observability","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"All Your GUCs in a Row: log_min_messages, log_min_error_statement, and log_error_verbosity"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/all-your-gucs-in-a-row-log-min-messages-log-min-error-statement-and-log-error-verbosity-vgxt2wbsf#faq","mainEntity":[{"@type":"Question","name":"Why does setting log_min_messages to 'log' in PostgreSQL make my errors disappear from the log?","acceptedAnswer":{"@type":"Answer","text":"Because LOG severity outranks ERROR in the log_min_messages severity ladder, unlike in client_min_messages. Setting log_min_messages = 'log' admits only LOG, FATAL, and PANIC messages, so ordinary ERROR and WARNING messages, including a division-by-zero error or a RAISE WARNING, are silently dropped from the server log while RAISE LOG messages still appear. Debugging a misconfigured Postgres log floor is easier with daily.dev surfacing deep dives on GUC quirks like this."}},{"@type":"Question","name":"How do I stop customer data from leaking into PostgreSQL error logs through STATEMENT and DETAIL lines?","acceptedAnswer":{"@type":"Answer","text":"Set log_min_error_statement to 'panic' so query text is never appended as a STATEMENT line, and set log_error_verbosity to 'terse' so DETAIL fields (which can include actual row values like a duplicate key) are dropped. Used together this pair is the one legitimate way to keep a compliance-sensitive log free of literals and table data, at the cost of losing the most useful debugging lines. Teams hardening database logs for compliance can track configuration trade-offs like this via daily.dev."}},{"@type":"Question","name":"What does log_error_verbosity = verbose add to PostgreSQL log messages compared to the default?","acceptedAnswer":{"@type":"Answer","text":"Verbose mode keeps everything the default level prints and adds the SQLSTATE code spliced in after the severity, for example ERROR: 23505, and a LOCATION line naming the C function, file, and line number that raised the message, such as _bt_check_unique, nbtinsert.c:666. This applies to every logged message, including routine notices, which can add noisy LOCATION lines forever. daily.dev helps engineers comparing verbose Postgres logging trade-offs stay on top of database tuning details."}}]}
```

