parameter “…” requires a Boolean value

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 boolean configuration parameter was given a value that is not a recognized boolean. PostgreSQL raises SQLSTATE 22023 (invalid_parameter_value).

What the server log shows

ERROR:  parameter "autovacuum" requires a Boolean value

Why PostgreSQL raises this — what the manual says

Section 19.1.1 Parameter Names and Values:

“Values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of one of these.”

Boolean GUCs accept only a fixed set of truth literals. A value outside that set cannot be interpreted as boolean, so PostgreSQL reports 22023.

Common causes

How to fix it

  1. Use a valid boolean literal: on/off, true/false, 1/0.
  2. Remove stray quotes/whitespace around the value.
  3. Check the parameter type in pg_settings.vartype.

Related & next steps

Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.