log_error_verbosity

A configuration parameter controlling the amount of detail written in the server log

log_error_verbosity is a configuration parameter controlling the amount of detail written in the server log for each message.

log_error_verbosity was added in PostgreSQL 7.4.

Usage

log_error_verbosity can be set to one of these values:

  • TERSE
  • DEFAULT
  • VERBOSE

Potential gotcha

If changing log_error_verbosity with the ALTER SYSTEM command, note that "ALTER SYSTEM SET log_error_verbosity TO default" will (as per the normal behaviour of ALTER SYSTEM) result in log_error_verbosity  being removed from postgresql.auto.conf. Use the syntax "ALTER SYSTEM SET log_error_verbosity TO 'default'" instead.

Default value

The default value for log_error_verbosity is: DEFAULT.

Change history

Examples

Sample log output with log_error_verbosity set to DEFAULT:

[2020-12-23 12:58:39 CET] [unknown] [unknown] [unknown] LOG:  connection received: host=::1 port=55184
[2020-12-23 12:58:39 CET] [unknown] postgres postgres LOG:  connection authorized: user=postgres database=postgres application_name=psql
[2020-12-23 12:58:41 CET] psql postgres postgres LOG:  statement: SELECT 1;
[2020-12-23 12:58:42 CET] psql postgres postgres LOG:  disconnection: session time: 0:00:02.196 user=postgres database=postgres host=::1 port=55184

The same sequence with log_error_verbosity set to VERBOSE:

[2020-12-23 12:59:58 CET] [unknown] [unknown] [unknown] LOG:  00000: connection received: host=::1 port=54750
[2020-12-23 12:59:58 CET] [unknown] [unknown] [unknown] LOCATION:  BackendInitialize, postmaster.c:4395
[2020-12-23 12:59:58 CET] [unknown] postgres postgres LOG:  00000: connection authorized: user=postgres database=postgres application_name=psql
[2020-12-23 12:59:58 CET] [unknown] postgres postgres LOCATION:  PerformAuthentication, postinit.c:303
[2020-12-23 12:59:59 CET] psql postgres postgres LOG:  00000: statement: SELECT 1;
[2020-12-23 12:59:59 CET] psql postgres postgres LOCATION:  exec_simple_query, postgres.c:1044
[2020-12-23 12:59:59 CET] psql postgres postgres LOG:  00000: disconnection: session time: 0:00:01.367 user=postgres database=postgres host=::1 port=54750
[2020-12-23 12:59:59 CET] psql postgres postgres LOCATION:  log_disconnections, postgres.c:4745

Categories

GUC configuration item, Logging