postgresql_server: add conditional for small postgresql instances

The recent changes to postgresql_server increased the required memory past
what one of my VMs had. I've added a conditional in postgresql.conf to put
some memory settings back where they used to be (controlled by
small_postgres_instance, default is false) and created a default to not use
the small_postgres_instance settings unless specified
This commit is contained in:
Tim Flink 2019-11-18 20:36:20 +00:00 committed by Pierre-Yves Chibon
parent 5ecc8a9c4f
commit 48ef2735d3
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,2 @@
---
small_postgres_instance: false

View file

@ -121,8 +121,13 @@ temp_buffers = 32MB # min 800kB
# 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 small_postgres_instance %}
work_mem = 4MB
maintenance_work_mem = 1GB # min 1MB
{% else %}
work_mem = 32MB
maintenance_work_mem = 2GB # min 1MB
{% endif %}
#max_stack_depth = 2MB # min 100kB
# - Free Space Map -