Skip to content

Commit

Permalink
Send :reload to service[postgresql] on postgresql.conf changes.
Browse files Browse the repository at this point in the history
The current code sends :restart, which is disruptive. It is also not necessary in many situations (like changes to the `log_*` config attributes). Sending :reload means that some config changes that require :restart won't take effect automatically, but I think that's a safer default than the disruptive restart-all-the-time strategy.

Callers that want the old behavior can patch the resource:

```ruby
pgconf = resources("#{node['postgresql']['dir']}/postgresql.conf")
pgconf.notifies :reload, 'service[postgresql]', :immediately
```
  • Loading branch information
whilp committed Jun 14, 2013
1 parent 5f138e3 commit d5f5ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
owner "postgres"
group "postgres"
mode 0600
notifies :restart, 'service[postgresql]', :immediately
notifies :reload, 'service[postgresql]', :immediately
end

template "#{node['postgresql']['dir']}/pg_hba.conf" do
Expand Down

0 comments on commit d5f5ac4

Please sign in to comment.