Clean up postgresql template and move variables into host vars for each db host as they are memory dependent.

This commit is contained in:
Kevin Fenzi 2016-04-01 23:32:00 +00:00
parent da7de4ec0d
commit 4dad64e596
10 changed files with 17 additions and 23 deletions

View file

@ -121,16 +121,8 @@ shared_buffers = {{ shared_buffers }} # min 128kB or max_connections*16kB
# 8 MB is probably on the high side. We can probably do with 4MB. But we
# were seeing a problem and we have the RAM so we're going to try this.
{% if ansible_hostname.startswith("db-koji01") %}
work_mem = 4MB # min 64kB
maintenance_work_mem = 16MB # min 1MB
{% elif ansible_hostname.startswith("db01") %}
work_mem = 4MB # min 64kB
maintenance_work_mem = 1024MB # min 1MB
{% else %}
work_mem = 2MB # min 64kB
maintenance_work_mem = 1024MB # min 1MB
{% endif %}
#max_stack_depth = 2MB # min 100kB
# - Free Space Map -
@ -223,13 +215,7 @@ random_page_cost = 3.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
{% if ansible_hostname.startswith("db-koji01") %}
effective_cache_size = 24GB
{% elif ansible_hostname.startswith("db01") %}
effective_cache_size = 12GB
{% else %}
effective_cache_size = 5GB
{% endif %}
effective_cache_size = {{ effective_cache_size }}
# - Genetic Query Optimizer -