What is the difference between "service restart" and "service reload"
- restart = stop + start
- reload = remain running + re-read configuration files.
What you said is correct, reload
tells the service to reload its configuration files. That means it should be sufficient to reload the configuration; however there may be certain services that "don't follow the rule" or that won't reload config files. Due to this you're probably safer with restart
. I personally do not use postgresql
, so I don't know.
Not all services support reload
. For those that do, it is usually preferable to restarting (i.e. reloading causes less or no downtime).
The Debian Policy Manual specifies that every /etc/init.d/
script should support a force-reload
action, which means reload
if the service supports it, and restart
if the service doesn't support reloading.
I'm not sure how that translates into the modern Ubuntu upstart world.