select open change scope Open full search

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

CONFIGURATION / REPORTING AND LOGGING

log_error_verbosity

Read PG 18 manual ↗

Controls the amount of detail written in the server log for each message that is logged.

Type
enum
Context
superuser
Measured default
default
Unit
Metadata snapshot
18
Allowed values
terse, default, verbose

Definition PG 18 manual

Controls the amount of detail written in the server log for each message that is logged. Valid values are TERSE, DEFAULT, and VERBOSE, each adding more fields to displayed messages. TERSE excludes the logging of DETAIL, HINT, QUERY, and CONTEXT error information. VERBOSE output includes the SQLSTATE error code (see also Appendix A) and the source code file name, function name, and line number that generated the error. Only superusers and users with the appropriate SET privilege can change this setting.

Measured default history
Version intervalDefault
9.0 – 19default
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

log_error_verbosity sets the verbosity of logged messages. TERSE suppresses detail and hints, DEFAULT retains normal diagnostics, and VERBOSE adds SQLSTATE plus source file, function, and line information.

log_error_verbosity is a SUPERUSER-context setting. Superuser or a role granted the appropriate SET privilege can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.

It changes emitted diagnostic data rather than query semantics, but volume, sensitive content, log_line_prefix, destinations, collector throughput, and retention determine operational cost and usefulness.

Operational considerations

Changing log_error_verbosity in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.

Enabling richer logging without budgeting collector throughput, storage, retention, and downstream query cost.

Writing SQL text, bind values, identities, or host data without a redaction and access-control policy.

Changing log_error_verbosity globally without a rollback plan and a client or operational compatibility test.

Workload guidance

OLAP: Analytical jobs can justify richer log_error_verbosity telemetry, but account for long statements, large bind values, and bursty completion patterns in the log pipeline.

OLTP: Tune log_error_verbosity against an explicit observability question and a measured log-volume budget. Prefer selective thresholds, sampling, or role-level overrides over indiscriminate capture.

SMALL: Keep log_error_verbosity useful but bounded: verify disk, collector, retention, and redaction capacity before increasing detail or frequency.

Version history 1
  1. PG 14 → 15changed

Related entries

Further reading

Definition snapshot: english-manuals:00a14015e759f88a2a4fbfbb091… · English manual source