How to fix Parameter requires restart in PostgreSQL
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.
Quick fix
Fixes Parameter requires restart
SELECT name, context, setting
FROM pg_catalog.pg_settings
WHERE context = 'postmaster'
ORDER BY name;- Identify which parameters require restart
- Check for pending restart changes
- Apply the configuration change
- Restart PostgreSQL to apply the change
SELECT name, context, settingFROM pg_catalog.pg_settingsWHERE context = 'postmaster'ORDER BY name;Parameter requires restart
What this error means
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.
Typical symptoms
- Error message "parameter X cannot be changed without restarting the server" when using ALTER SYSTEM or modifying postgresql.conf
- Changes to shared_buffers, max_connections, port, or listen_addresses are not applied after reload
- pg_pending_restart column shows true for changed parameters in pg_settings view
- Configuration changes written to postgresql.auto.conf but not taking effect
- Need to restart PostgreSQL for changes to critical parameters to apply
Common causes
- Attempting to change postmaster-context parameters without restarting the server
- Using ALTER SYSTEM or postgresql.conf to modify server resource parameters that require restart
- Confusing reload (which only applies SIGHUP parameters) with restart (needed for postmaster parameters)
- Not checking the context column in pg_settings before making configuration changes
- Unaware which parameters require restart versus which can be reloaded
How to fix "Parameter requires restart"
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.
Advanced notes
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.
Frequently asked questions
- What does "Parameter requires restart" mean?
- 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.
- How do I fix "Parameter requires restart"?
- 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.
- What causes "Parameter requires restart"?
- Attempting to change postmaster-context parameters without restarting the server Using ALTER SYSTEM or postgresql.conf to modify server resource parameters that require restart Confusing reload (which only applies SIGHUP parameters) with restart (needed for postmaster parameters)
- Is the "Parameter requires restart" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.