diff --git a/roles/postgresql_server/templates/postgresql.conf b/roles/postgresql_server/templates/postgresql.conf index 74769d103d..2c51f931b8 100644 --- a/roles/postgresql_server/templates/postgresql.conf +++ b/roles/postgresql_server/templates/postgresql.conf @@ -117,7 +117,11 @@ max_connections = 750 # (change requires restart) shared_buffers = {{ shared_buffers }} # min 128kB or max_connections*16kB # (change requires restart) +{% if temp_buffers %} +temp_buffers = {{ temp_buffers }} # min 800kB +{% else %} temp_buffers = 32MB # min 800kB +{% endif %} #max_prepared_transactions = 5 # can be 0 or more # (change requires restart) # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory @@ -132,7 +136,12 @@ maintenance_work_mem = 1GB # min 1MB work_mem = 32MB maintenance_work_mem = 2GB # min 1MB {% endif %} + +{% if max_stack_depth %} +max_stack_depth = {{ max_stack_depth }} # min 100kB +{% else %} #max_stack_depth = 2MB # min 100kB +{% endif %} # - Free Space Map - @@ -225,7 +234,9 @@ random_page_cost = 1.1 # 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 effective_cache_size %} effective_cache_size = {{ effective_cache_size }} +{% endif %} # - Genetic Query Optimizer -