↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Configuration Parameters

log_min_error_statement

Controls which SQL statements that cause an error condition are recorded in the server log. The current SQL statement is included in the log entry for any message of the specified severity or higher. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. The default is ERROR, which means statements causing errors, log messages, fatal errors, or panics will be logged. To effectively turn off logging of failing statements, set this parameter to PANIC. Only superusers and users with the appropriate SET privilege can change this setting.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

boot val
error
category
Reporting and Logging / When to Log
context
superuser
doc same as
Unknown
documented
true
enumvals
debug5, debug4, debug3, debug2, debug1, info, notice, warning, error, log, fatal, panic
extra desc
Each level includes all the levels that follow it. The later the level, the fewer messages are sent.
lang
en
max val
Unknown
metadata version
18
min val
Unknown
name
log_min_error_statement
short desc
Causes all statements generating error at or above this level to be logged.
source
pg-settings-source-snapshot
unit
Unknown
vartype
enum

Definition PG 18

Controls which SQL statements that cause an error condition are recorded in the server log. The current SQL statement is included in the log entry for any message of the specified severity or higher. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. The default is ERROR, which means statements causing errors, log messages, fatal errors, or panics will be logged. To effectively turn off logging of failing statements, set this parameter to PANIC. Only superusers and users with the appropriate SET privilege can change this setting.

Compare versions

Complete source facts

doc html

<p>
        Controls which SQL statements that cause an error
        condition are recorded in the server log.  The current
        SQL statement is included in the log entry for any message of
        the specified
        <a class="link" href="/docs/18/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS" title="Table 19.3. Message Severity Levels">severity</a>
        or higher.
        Valid values are <code class="literal">DEBUG5</code>,
        <code class="literal">DEBUG4</code>, <code class="literal">DEBUG3</code>,
        <code class="literal">DEBUG2</code>, <code class="literal">DEBUG1</code>,
        <code class="literal">INFO</code>, <code class="literal">NOTICE</code>,
        <code class="literal">WARNING</code>, <code class="literal">ERROR</code>,
        <code class="literal">LOG</code>,
        <code class="literal">FATAL</code>, and <code class="literal">PANIC</code>.
        The default is <code class="literal">ERROR</code>, which means statements
        causing errors, log messages, fatal errors, or panics will be logged.
        To effectively turn off logging of failing statements,
        set this parameter to <code class="literal">PANIC</code>.
        Only superusers and users with the appropriate <code class="literal">SET</code>
        privilege can change this setting.
       </p>

documentation revision

{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:7aa671beb55b4060c4a6b01bc19224c05db017c8e5b7598bafa7a6c92b09d32f

Text language: en · wiki-repair-20261023:7aa671beb55b4060c4a6b01bc19224c05db017c8e5b7598bafa7a6c92b09d32f