postgresql: version 9.6 by default

For Jessie we use external repositories
For Stretch we install from Debian repositories
This commit is contained in:
Jérémy Lecour 2017-10-04 14:54:46 +02:00 committed by Jérémy Lecour
parent 5ffc94281f
commit 72c1bb4834
4 changed files with 6 additions and 13 deletions

View File

@ -9,4 +9,4 @@ postgresql_random_page_cost: 1.5
postgresql_effective_cache_size: "{{ (ansible_memtotal_mb * 0.5) | int }}MB"
# PostgreSQL version
postgresql_version: '9.4'
postgresql_version: '9.6'

View File

@ -1,9 +1,10 @@
---
- include: pgdg-repo.yml
when: postgresql_version != '9.4'
- include: packages_jessie.yml
when: ansible_distribution_release == "jessie"
- include: packages.yml
- include: packages_stretch.yml
when: ansible_distribution_major_version | version_compare('9', '>=')
- include: config.yml

View File

@ -1,8 +0,0 @@
---
- name: Install postgresql package
apt:
name: '{{item}}'
with_items:
- "postgresql-{{postgresql_version}}"
- ptop

View File

@ -3,7 +3,7 @@ shared_buffers = {{ postgresql_shared_buffers }}
work_mem = {{ postgresql_work_mem }}
#shared_preload_libraries = 'pg_stat_statements'
#synchronous_commit = off
{% if postgresql_version |version_compare('9.5', '<') %}
{% if postgresql_version | version_compare('9.5', '<') %}
checkpoint_segments = 30
{% else %}
max_wal_size = 15GB