Diagnostic Queries
Symptoms
A configuration parameter was given a value outside its allowed set/range. PostgreSQL raises SQLSTATE 22023 (invalid_parameter_value).
- The value is the wrong type or out of range for the parameter.
- A DETAIL/HINT often lists acceptable values.
- Common with enum-style or bounded numeric parameters.
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
- An out-of-range numeric value.
- An enum parameter set to an undefined option.
- A unit/format the parameter does not accept.
How to fix it
- Set a value within the parameter’s allowed range/options.
- Check valid values:
SELECT enumvals FROM pg_settings WHERE name='log_min_messages';. - Include correct units (e.g.
'256MB') for memory parameters.
Related & next steps
Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.
Thanks — noted. This helps keep the database accurate.