SQLSTATE 42704 ERROR Class 42: Syntax Error or Access Rule Violation

undefined_object unrecognized configuration parameter “…” — 42704

PostgreSQL error "unrecognized configuration parameter "…"" (SQLSTATE 42704): what it means, common causes, and how to fix it.

PG 12, 13, 14, 15, 16, 17, 18 Official docs
Last reviewed May 2025 Grounded in source

Diagnostic Queries

Symptoms

A SET, SHOW, or ALTER SYSTEM referenced a configuration parameter name PostgreSQL does not recognize. It raises SQLSTATE 42704 (undefined_object).

  • The parameter name is unknown (typo, removed, or extension-provided).
  • Custom (dotted) parameters need their extension or a placeholder class.
  • Common after upgrades that rename/remove parameters.

What the server log shows

ERROR:  unrecognized configuration parameter "shared_buffer"

Why PostgreSQL raises this — what the manual says

As Section 19.1.1 Parameter Names and Values explains:

PostgreSQL only accepts parameter names it recognizes; a SET, SHOW, or ALTER SYSTEM naming a parameter that does not exist (or a custom/placeholder parameter whose extension has not been loaded) raises this error.

PostgreSQL validates parameter names against its known GUCs (plus those registered by loaded extensions). An unknown name cannot be resolved and is rejected with 42704.

Common causes

  • A typo in the parameter name (e.g. shared_buffer vs shared_buffers).
  • A parameter removed/renamed in a newer version.
  • An extension-defined parameter set before the extension is loaded.

How to fix it

  1. Check the exact name: SELECT name FROM pg_settings WHERE name LIKE 'shared%';.
  2. Consult the docs for renamed/removed parameters after an upgrade.
  3. Load the providing extension (or define a custom variable class) before setting custom parameters.

Related & next steps

Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.

Was this helpful?