Diagnostic Queries
Symptoms
An attempt to change a configuration parameter at runtime failed because that parameter only takes effect at server start. PostgreSQL raises SQLSTATE 55P02 (cant_change_runtime_param).
- Affects
postmaster-context parameters (e.g.shared_buffers,max_connections). SET/ALTER SYSTEM+ reload is not enough — a restart is required.- The value can be written but won’t apply until restart.
What the server log shows
ERROR: parameter "shared_buffers" cannot be changed without restarting the server
Why PostgreSQL raises this — what the manual says
Section 19.1.2 Parameter Interaction via the Configuration File:
“Some parameters can only be set at server start; any changes to their entries in the configuration file will be ignored until the server is restarted.”
Parameters with the postmaster context allocate shared resources at startup and cannot be altered in a running server. PostgreSQL rejects an in-session change with 55P02; the new value applies only after a restart.
Common causes
- Trying to
SETa startup-only parameter at runtime. - Expecting
pg_reload_conf()to apply a postmaster-context value. - Tuning memory parameters like
shared_bufferslive.
How to fix it
- Persist the value with
ALTER SYSTEM SET shared_buffers = '4GB';, then restart PostgreSQL. - Check
SELECT name, context FROM pg_settings WHERE name='shared_buffers';. - Schedule a maintenance window for the restart.
Related & next steps
Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.
Thanks — noted. This helps keep the database accurate.