Hands-on Lab·PostgreSQL
PostgreSQL Reload, Restart and pending_restart
Change shared_buffers, reload, and the value does not move - but pending_restart flips to t. The server is telling you it has accepted the change and is waiting for a restart to apply it.
Configuration Guide 14 of 47 Intermediate
- OSUbuntu 26.04 LTS
- PostgreSQL18.6-0ubuntu0.26.04.1
- TimeAbout 14 min
pending_restart has been in pg_settings since 9.5. It is one of the most useful columns in the view and one of the least known.
- PackagingDebian cluster layout
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a change is in the file and the running value has not moved. This matters because a reload cannot apply everything - and pending_restart is the server telling you exactly that.
- staging a change that a reload cannot apply, because of its context
- finding
pending_restartset, which is the server saying so directly - restarting the per-cluster unit, and watching it finally apply
Before you start
- A superuser connection, and a cluster you can restart.
-
Stage a change that a reload cannot apply
-
Restart, and watch it apply