invalid value for parameter “…”: “…”

SQLSTATE 22023 condition invalid_parameter_value class 22 — Data Exception severity ERROR
Reproduced & verified on PostgreSQL 14.23, 15.18, 16.14, 17.10 and 18.4 — identical message on every version.
Last reviewed 30 May 2025 · Reproduced live with the SQL on this page.

Symptoms

A configuration parameter was given a value outside its allowed set/range. PostgreSQL raises SQLSTATE 22023 (invalid_parameter_value).

What the server log shows

ERROR:  invalid value for parameter "log_min_messages": "verbose"

Why PostgreSQL raises this — what the manual says

Section 19.1.1 Parameter Names and Values:

“Enumerated-type parameters are written in the same way as string parameters, but are restricted to have one of a limited set of values.”

Each GUC has a defined type and valid domain. A value that doesn’t parse or falls outside the allowed set/range is rejected with 22023.

Common causes

How to fix it

  1. Set a value within the parameter’s allowed range/options.
  2. Check valid values: SELECT enumvals FROM pg_settings WHERE name='log_min_messages';.
  3. Include correct units (e.g. '256MB') for memory parameters.

Related & next steps

Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.