-
Notifications
You must be signed in to change notification settings - Fork 572
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
New structure to allow "tuning" during deploy without using pg_tune #301
base: master
Are you sure you want to change the base?
Conversation
This looks promising. Unless I'm mistaken, pgtune is supported only on old versions of PG so no-one should have to object. |
Thanks for the comments @ls-initiatives . I've left the existing pgtune in there, just in case someone was relying on the output for their existing servers. I didn't want an update to this playbook to suddenly change all of their tuning parameters, and cause a performance problem. This parameter set should be better... but I figured it was best to play it safe and not change the existing behaviour if at all possible. Once we get past supporting PostgreSQL v9.3, then yes, that code can be removed and dumped. |
f8621f9
to
e6efe6e
Compare
I think there is a problem... as I was relying on " That's a big problem, because if you don't agree with the settings as provided by the tuning script then you have no option to override them except with an " Another awful solution is to include the inventory vars as a part of the play:
... but IMHO, that's even worse, as it permanently breaks the expected variable precedence. @jlozadad , @UnderGreen @sebalix... do you have any ideas? QUESTION: How can I set per-host or per-group variables, which will override the settings from the tuning include? |
Host vars can be arranged in a number of different path (inside/alongside the inventory dir, with/without |
@ls-initiatives ... that's what I figured. It was a horrible, HORRIBLE kludge to get things working. My problem is that:
... but I want values in
Help! |
@sebalix or @UnderGreen ... do you have any suggestions? |
Wouldn't it make sense to simply put the optimized values as defaults ? This way users who have already customized their host_vars won't be impacted, and the others will benefit from better performance when they upgrade the role ? |
I second just having these values as defaults. I've had a similar problem with vars overriding lookups:- |
Thanks @Is-initiatives and @gilesw It looks like I'll need to try and revisit this... but how can I implement this type of hierarchy? role defaults version specific defaults group defaults tuning tweaks (the main crux of this change) server specific The only way I've found to do that, is to "include_vars" everything in the order I want... which is pretty awful IMHO. |
This is a common problem with ansible at the moment. The requirement to have dynamic defaults for different use cases which are still overridable at the group level:- We have to hope that this gets passed I think. |
These might act as a better set of defaults:- https://github.com/jberkus/annotated.conf/blob/master/annotated.csv |
This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! |
This isn't 100% finished, but it's an example of how we can use Ansible to tune PostgreSQL without the use of pg_tune.
When it's complete, it will be a fix for #201