-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Avoid unnecessary restart when postgresql.conf changes #41
Comments
It will ask a bit of implementation but would indeed be a great addition to the rule imho. Anyone else any toughts ? maybe on negative impacts it might have that i am missing ? |
meta/main.yml: tasks/configure.yml"
handlers/main/yml:
|
Trouble is working out
Also, notify takes a list (two notify keys would just mean one is ignored)
I'm not convinced the logic is any easier - I'd just notify a full restart when something fundamental changed, and a reload otherwise. |
hey Thx for all the contributions I will try to test en merge in the coming weeks On holiday now till end of next week ... Patrik -----Original message----- Trouble is working out something_fundamental. Some things in postgresql.conf need a restart, most just need a reload. postgresql_need_full_postgresql_restart should presumably be in defaults/main.yml, not meta/main.yml Also, notify takes a list (two notify keys would just mean one is ignored) python -c 'import yaml; d = "test_dict:\n notify: one\n notify: two"; y = yaml.load(d); print y' I'm not convinced the logic is any easier - I'd just notify a full restart when something fundamental changed, and a reload otherwise. — |
Most postgresql.conf changes don't need a restart, just a reload. And a reload is much safer.
To avoid a restart except where essential, there are a few approaches.
One is documented at http://www.postgresql.org/message-id/[email protected]
My thought was to have postgresql.conf only include postgresql_needs_restart.conf and postgresql_needs_reload.conf. postgresql_needs_restart.conf would include the parameters mentioned in the above email thread.
If postgresql.conf or postgresql_needs_restart.conf changes, the restart postgresql handler is fired as now. But if postgresql_needs_reload.conf changes, a new reload postgresql handler is fired.
I'm happy to implement this but thought I'd see what your thoughts were first on whether it's a sensible approach or if there's anything I've missed.
The text was updated successfully, but these errors were encountered: