55P02ERRORTier 2 — Caution✅ HIGH confidencecannot change runtime parameter
What this means
SQLSTATE 55P02 is a Postgres-specific error raised when a GUC (Grand Unified Configuration) parameter cannot be changed at runtime because it is a startup-only or superuser-only parameter, or the session does not have the authority to change it.
Why it happens
- 1Attempting to SET a parameter marked as PGC_POSTMASTER (requires server restart to change)
- 2A non-superuser trying to SET a superuser-only parameter
- 3Attempting to change a parameter whose scope does not allow session-level changes
How to reproduce
Setting a startup-only parameter at runtime.
SET max_connections = 200; -- can only be changed in postgresql.conf + restartFix 1: Change the parameter in postgresql.conf and restart the server
When a startup-only parameter needs to be changed.
-- In postgresql.conf:
-- max_connections = 200
-- Then: pg_ctl restartWhy this works
Startup-only parameters are read at server start and cannot be changed while the server is running. Edit postgresql.conf and restart Postgres.
Fix 2: Use pg_reload_conf() for SIGHUP-reloadable parameters
When the parameter can be reloaded without a restart.
-- Edit postgresql.conf, then:
SELECT pg_reload_conf();Why this works
Some parameters (PGC_SIGHUP) can be reloaded without a full restart. Check the parameter description in the documentation.
Sources
📚 Official docs: https://www.postgresql.org/docs/current/errcodes-appendix.html
📚 Feature docs: https://www.postgresql.org/docs/current/config-setting.html
🔧 Source ref: Class 55 — Object Not in Prerequisite State (Postgres-specific)
Confidence assessment
✅ HIGH confidence
Postgres-specific. Stable across all versions.
See also
📄 Reference pages