PostgreSQL parameters with "postmaster" context cannot be changed without restarting the server. Learn how to identify restart-required parameters, apply changes correctly, and verify pending restarts.
When PostgreSQL displays "Parameter requires restart," it means you attempted to change a configuration setting that requires a full server restart to take effect. PostgreSQL has different parameter contexts: postmaster parameters require a restart, SIGHUP parameters only need a reload, and user/session parameters can be changed immediately. Postmaster parameters typically control core server resources like memory allocation, connection limits, and protocol settings that cannot be modified while the server is running.
Query the pg_settings system view to see all parameters that require restart:
SELECT name, context, setting
FROM pg_catalog.pg_settings
WHERE context = 'postmaster'
ORDER BY name;Parameters with context "postmaster" require a full restart. Parameters with context "sighup" only need a reload with SELECT pg_reload_conf().
After making changes with ALTER SYSTEM or modifying postgresql.conf, check if a restart is pending:
SELECT name, setting, pending_restart
FROM pg_settings
WHERE pending_restart = true;If any rows are returned, a server restart is required for those settings to take effect.
There are two ways to change parameters:
Using ALTER SYSTEM (recommended):
ALTER SYSTEM SET parameter_name = value;Or edit postgresql.conf directly:
sudo nano /etc/postgresql/16/main/postgresql.confChanges made with ALTER SYSTEM are written to postgresql.auto.conf, not postgresql.conf.
For postmaster parameters, restart the entire PostgreSQL server:
On Linux (systemd):
sudo systemctl restart postgresqlOn macOS (if installed via Homebrew):
brew services restart postgresqlUsing pg_ctl:
sudo -u postgres /usr/lib/postgresql/16/bin/pg_ctl -D /var/lib/postgresql/16/main restartAfter restart, verify the new value is applied:
SELECT name, setting, pending_restart
FROM pg_settings
WHERE name = 'your_parameter_name';Confirm that pending_restart is now false and the setting matches your intended value.
Common postmaster parameters that cause this error: shared_buffers (memory for caching), max_connections (connection limit), wal_level (write-ahead logging level), listen_addresses (network binding), port (TCP port), and max_wal_senders (replication connections). The pg_settings view is essential for administration—you can also check https://postgresqlco.nf/ to look up any parameter's context requirements. When automating configuration changes in scripts, always check pending_restart after making changes to avoid unexpected behavior. In containerized environments (Docker, Kubernetes), include restart logic in your deployment process or use configuration management tools that understand PostgreSQL's restart requirements.
ERROR: syntax error at end of input
Syntax error at end of input in PostgreSQL
Bind message supplies N parameters but prepared statement requires M
Bind message supplies N parameters but prepared statement requires M in PostgreSQL
Multidimensional arrays must have sub-arrays with matching dimensions
Multidimensional arrays must have sub-arrays with matching dimensions
ERROR: value too long for type character varying
Value too long for type character varying
insufficient columns in unique constraint for partition key
How to fix "insufficient columns in unique constraint for partition key" in PostgreSQL