job.answiz.com
  • 1
Votes
name

I'm trying to understand the difference between service restart [someservice] and service reload [someservice]. I understand that "restart" restarts the service whereas "reload" reloads the configuration, but I don't understand the practical implications of this well enough to determine which I should use in a given context.

An example: most guides I've read for setting up PostgreSQL say that, once I've edited postgresql.conf and pg_hba.conf to allow remote connections, I should issue sudo service postgresql restart. However, if I were guessing which to use based on the description above I would choose "reload".

In case it matters, I'm on Ubuntu 11.10 - though I'm hoping for as generally applicable an explanation as possible.

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.

  • 0
Reply Report