Add support for Postgres v12

This commit is contained in:
Slavi Pantaleev 2019-10-04 08:51:32 +03:00
parent 9df80b00b6
commit 9c438a3870
4 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,12 @@
# 2019-10-04
## Postgres 12 support
The playbook now installs [Postgres 12](https://www.postgresql.org/about/news/1976/) by default.
If you have have an existing setup, it's likely running on an older Postgres version (9.x, 10.x or 11.x). You can easily upgrade by following the [upgrading PostgreSQL guide](docs/maintenance-postgres.md#upgrading-postgresql).
# 2019-10-03 # 2019-10-03
## Synapse 1.4.0 ## Synapse 1.4.0

View file

@ -42,7 +42,7 @@ docker run \
--rm \ --rm \
--network matrix \ --network matrix \
--env-file=/matrix/postgres/env-postgres-psql \ --env-file=/matrix/postgres/env-postgres-psql \
postgres:11.1-alpine \ postgres:12.0-alpine \
pg_dump -h matrix-postgres \ pg_dump -h matrix-postgres \
| gzip -c \ | gzip -c \
> /postgres.sql.gz > /postgres.sql.gz

View file

@ -11,7 +11,8 @@ matrix_postgres_data_path: "{{ matrix_postgres_base_path }}/data"
matrix_postgres_docker_image_v9: "postgres:9.6.15-alpine" matrix_postgres_docker_image_v9: "postgres:9.6.15-alpine"
matrix_postgres_docker_image_v10: "postgres:10.10-alpine" matrix_postgres_docker_image_v10: "postgres:10.10-alpine"
matrix_postgres_docker_image_v11: "postgres:11.5-alpine" matrix_postgres_docker_image_v11: "postgres:11.5-alpine"
matrix_postgres_docker_image_latest: "{{ matrix_postgres_docker_image_v11 }}" matrix_postgres_docker_image_v12: "postgres:12.0-alpine"
matrix_postgres_docker_image_latest: "{{ matrix_postgres_docker_image_v12 }}"
# This variable is assigned at runtime. Overriding its value has no effect. # This variable is assigned at runtime. Overriding its value has no effect.
matrix_postgres_docker_image_to_use: '{{ matrix_postgres_docker_image_latest }}' matrix_postgres_docker_image_to_use: '{{ matrix_postgres_docker_image_latest }}'

View file

@ -44,3 +44,8 @@
set_fact: set_fact:
matrix_postgres_detected_version_corresponding_docker_image: "{{ matrix_postgres_docker_image_v10 }}" matrix_postgres_detected_version_corresponding_docker_image: "{{ matrix_postgres_docker_image_v10 }}"
when: "matrix_postgres_detected_version == '10' or matrix_postgres_detected_version.startswith('10.')" when: "matrix_postgres_detected_version == '10' or matrix_postgres_detected_version.startswith('10.')"
- name: Determine corresponding Docker image to detected version (use 11.x, if detected)
set_fact:
matrix_postgres_detected_version_corresponding_docker_image: "{{ matrix_postgres_docker_image_v11 }}"
when: "matrix_postgres_detected_version == '11' or matrix_postgres_detected_version.startswith('11.')"