Skip to content

Commit 9662278

Browse files
authored
Merge pull request ANXS#504 from gclough/postgresql_13
feat: Support PostgreSQL v13
2 parents 90ba87b + 29e7261 commit 9662278

16 files changed

+1692
-27
lines changed

.travis.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ services:
99

1010
env:
1111
matrix:
12-
## DISABLED ## - IMAGE_NAME="ubuntu:16.04-builded"
13-
- IMAGE_NAME="debian:8-builded"
14-
- IMAGE_NAME="debian:9-builded"
1512
- IMAGE_NAME="centos:7-builded"
13+
## NOT WORKING YET ## - IMAGE_NAME="centos:8-builded"
14+
- IMAGE_NAME="debian:9-builded"
15+
## NOT WORKING YET ## - IMAGE_NAME="debian:10-builded"
16+
## NOT WORKING YET ## - IMAGE_NAME="ubuntu:18.04-builded"
17+
## NOT WORKING YET ## - IMAGE_NAME="ubuntu:20.04-builded"
1618
## DISABLED ## - IMAGE_NAME="fedora:27-builded"
1719
install:
1820
- pip install ansible=="2.4.4.0" docker-py

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ An example how to include this role as a task:
5656

5757
| Distribution / PostgreSQL | 9.5 | 9.6 | 10 | 11 | 12 | 13 |
5858
| ------------------------- |:---:|:---:|:--:|:--:|:--:|:--:|
59-
| Debian 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
60-
| Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
61-
| CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: |
62-
| CentOS 8.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :no_entry: |
63-
| Fedora latest | :x: | :x: | :x: | :x: | :x: | :x: |
59+
| CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
60+
| CentOS 8.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
61+
| Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
62+
| Debian 10.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
63+
| Ubuntu 18.04.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
64+
| Ubuntu 20.04.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
65+
| Fedora latest | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
6466

6567
- :white_check_mark: - tested, works fine
6668
- :warning: - Not for production use
@@ -74,7 +76,7 @@ An example how to include this role as a task:
7476

7577
```yaml
7678
# Basic settings
77-
postgresql_version: 12
79+
postgresql_version: 13
7880
postgresql_encoding: "UTF-8"
7981
postgresql_locale: "en_US.UTF-8"
8082
postgresql_ctype: "en_US.UTF-8"

defaults/main.yml

+33-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# file: postgresql/defaults/main.yml
22

33
# Basic settings
4-
postgresql_version: 12
4+
postgresql_version: 13
55
postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}" # Short version of the postgresql_version, used in some path and filenames
66
postgresql_encoding: "UTF-8"
77
postgresql_data_checksums: false
@@ -40,7 +40,16 @@ postgresql_ext_install_contrib: no
4040
postgresql_ext_install_dev_headers: no
4141
postgresql_ext_install_postgis: no
4242

43-
postgresql_ext_postgis_version: "2.5" # be careful: check whether the postgresql/postgis versions work together
43+
# PostGIS
44+
postgresql_postgis_release_compatibility:
45+
9.5: "3.0"
46+
9.6: "3.1"
47+
10: "3.1"
48+
12: "3.1"
49+
13: "3.1"
50+
51+
postgresql_ext_postgis_version: "{{ postgresql_postgis_release_compatibility.get(postgresql_version) }}"
52+
postgresql_ext_postgis_version_terse: "{{ postgresql_ext_postgis_version | replace('.','') }}"
4453

4554
postgresql_ext_postgis_deps:
4655
- libgeos-c1
@@ -138,7 +147,7 @@ postgresql_ssl_ciphers:
138147
- "@STRENGTH"
139148
postgresql_ssl_prefer_server_ciphers: on
140149
postgresql_ssl_ecdh_curve: "prime256v1"
141-
postgresql_ssl_min_protocol_version: "TLSv1" # (>= 12)
150+
postgresql_ssl_min_protocol_version: "TLSv1.2" # (>= 12)
142151
postgresql_ssl_max_protocol_version: "" # (>= 12)
143152
postgresql_ssl_dh_params_file: "" # (>= 10)
144153
postgresql_ssl_passphrase_command: "" # (>= 11)
@@ -179,9 +188,11 @@ postgresql_temp_buffers: 8MB # min 800kB
179188
postgresql_max_prepared_transactions: 0 # zero disables the feature
180189

181190
postgresql_work_mem: 1MB # min 64kB
191+
postgresql_hash_mem_multiplier: 1.0 # (>= 13)
182192
postgresql_maintenance_work_mem: 16MB # min 1MB
183193
postgresql_replacement_sort_tuples: 150000 # (>= 9.6) limits use of replacement selection sort
184194
postgresql_autovacuum_work_mem: -1 # min 1MB, or -1 to use maintenance_work_mem
195+
postgresql_logical_decoding_work_mem: 64MB # (>= 13)
185196
postgresql_max_stack_depth: 2MB # min 100kB
186197
postgresql_shared_memory_type: "mmap" # (>= 12)
187198

@@ -227,6 +238,7 @@ postgresql_bgwriter_flush_after: 0 # (>= 9.6) 0 disables,
227238
# - Asynchronous Behavior -
228239

229240
postgresql_effective_io_concurrency: 1 # 1-1000; 0 disables prefetching
241+
postgresql_maintenance_io_concurrency: 10 # (>= 13)
230242
postgresql_max_worker_processes: 8 # (change requires restart)
231243
postgresql_max_parallel_maintenance_workers: 2 # (>= 11) taken from max_parallel_workers
232244
postgresql_max_parallel_workers_per_gather: 0 # (>= 9.6) taken from max_worker_processes
@@ -243,7 +255,7 @@ postgresql_backend_flush_after: 0 # (>= 9.6) 0 disables, default
243255

244256
# - Settings -
245257

246-
postgresql_wal_level: "minimal" # minimal, archive (<= 9.5), hot_standby (<= 9.5), replica (>= 9.6), or logical
258+
postgresql_wal_level: "replica" # minimal, archive (<= 9.5), hot_standby (<= 9.5), replica (>= 9.6), or logical
247259
postgresql_fsync: on # flush data to disk for crash safety
248260
# (turning this off can cause
249261
# unrecoverable data corruption)
@@ -274,6 +286,7 @@ postgresql_wal_recycle: on # recycle WAL files
274286
postgresql_wal_buffers: -1 # min 32kB, -1 sets based on shared_buffers
275287
postgresql_wal_writer_delay: 200ms # 1-10000 milliseconds
276288
postgresql_wal_writer_flush_after: 1MB # (>= 9.6) 0 disables
289+
postgresql_wal_skip_threshold: 2MB # (>= 13)
277290
postgresql_commit_delay: 0 # range 0-100000, in microseconds
278291
postgresql_commit_siblings: 5 # range 1-1000
279292

@@ -321,6 +334,7 @@ postgresql_primary_slot_name: "" # (>= 12)
321334
postgresql_promote_trigger_file: "" # (>= 12)
322335
postgresql_recovery_min_apply_delay: 0 # (>= 12)
323336

337+
324338
#------------------------------------------------------------------------------
325339
# REPLICATION
326340
#------------------------------------------------------------------------------
@@ -330,10 +344,13 @@ postgresql_recovery_min_apply_delay: 0 # (>= 12)
330344
# Set these on the master and on any standby that will send replication data.
331345

332346
# max number of walsender processes
333-
postgresql_max_wal_senders: 0
347+
postgresql_max_wal_senders: 10
334348
postgresql_wal_sender_delay: 1s # walsender cycle time, 1-10000 milliseconds (<= 9.1)
335349

336-
postgresql_wal_keep_segments: 0 # in logfile segments, 16MB each; 0 disables
350+
postgresql_wal_keep_segments: 0 # in logfile segments, 16MB each; 0 disables
351+
postgresql_wal_keep_size: 0 # (>= 13)
352+
postgresql_max_slot_wal_keep_size: -1 # (>= 13)
353+
337354
postgresql_replication_timeout: 60s # in milliseconds; 0 disables (<= 9.2)
338355
postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables (>= 9.3)
339356
postgresql_max_replication_slots: 0 # max number of replication slots
@@ -362,6 +379,7 @@ postgresql_hot_standby: off
362379
postgresql_max_standby_archive_delay: 30s # -1 allows indefinite delay
363380
# max delay before canceling queries when reading streaming WAL;
364381
postgresql_max_standby_streaming_delay: 30s # -1 allows indefinite delay
382+
postgresql_wal_receiver_create_temp_slot: off # (>= 13)
365383
# send replies at least this often
366384
postgresql_wal_receiver_status_interval: 10s # 0 disables
367385
# send info from standby to prevent query conflicts
@@ -397,6 +415,7 @@ postgresql_enable_nestloop: on
397415
postgresql_enable_parallel_append: on # (>= 11)
398416
postgresql_enable_seqscan: on
399417
postgresql_enable_sort: on
418+
postgresql_enable_incremental_sort: on # (>= 13)
400419
postgresql_enable_tidscan: on
401420
postgresql_enable_partitionwise_join: off # (>= 11)
402421
postgresql_enable_partitionwise_aggregate: off # (>= 11)
@@ -533,6 +552,8 @@ postgresql_log_min_error_statement: "error"
533552
# -1 is disabled, 0 logs all statements and their durations, > 0 logs only
534553
# statements running at least this number of milliseconds
535554
postgresql_log_min_duration_statement: -1
555+
postgresql_log_min_duration_sample: -1 # (>= 13)
556+
postgresql_log_statement_sample_rate: 1.0 # (>= 13)
536557
postgresql_log_transaction_sample_rate: 0.0 # (>= 12)
537558

538559

@@ -573,6 +594,8 @@ postgresql_log_line_prefix: "%t "
573594

574595
# log lock waits >= deadlock_timeout
575596
postgresql_log_lock_waits: off
597+
postgresql_log_parameter_max_length: -1 # (>= 13)
598+
postgresql_log_parameter_max_length_on_error: 0 # (>= 13)
576599
postgresql_log_statement: "none" # none, ddl, mod, all
577600
postgresql_log_replication_commands: off
578601
# log temporary files equal or larger
@@ -619,10 +642,12 @@ postgresql_autovacuum_max_workers: 3
619642
postgresql_autovacuum_naptime: 1min
620643
# min number of row updates before vacuum
621644
postgresql_autovacuum_vacuum_threshold: 50
645+
postgresql_autovacuum_vacuum_insert_threshold: 1000 # (>= 13)
622646
# min number of row updates before analyze
623647
postgresql_autovacuum_analyze_threshold: 50
624648
# fraction of table size before vacuum
625649
postgresql_autovacuum_vacuum_scale_factor: 0.2
650+
postgresql_autovacuum_vacuum_insert_scale_factor: 0.2 # (>= 13)
626651
# fraction of table size before analyze
627652
postgresql_autovacuum_analyze_scale_factor: 0.1
628653
# maximum XID age before forced vacuum
@@ -666,7 +691,7 @@ postgresql_vacuum_multixact_freeze_table_age: 150000000 # (>= 9.3)
666691
postgresql_bytea_output: "hex" # hex, escape
667692
postgresql_xmlbinary: "base64"
668693
postgresql_xmloption: "content"
669-
postgresql_gin_fuzzy_search_limit: 0 # (<= 9.2)
694+
postgresql_gin_fuzzy_search_limit: 0 # (<= 9.2)
670695
postgresql_gin_pending_list_limit: 4MB # (>= 9.5)
671696

672697

@@ -786,6 +811,7 @@ postgresql_pgtune_type: "Mixed"
786811
# Maximum number of expected connections, if "no", default based on db type
787812
postgresql_pgtune_connections: no
788813

814+
789815
#------------------------------------------------------------------------------
790816
# INSTALL/REPO
791817
#------------------------------------------------------------------------------

meta/main.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,25 @@ galaxy_info:
1010
platforms:
1111
- name: Debian
1212
versions:
13-
- jessie
1413
- stretch
14+
## - buster
1515

1616
- name: EL
1717
versions:
18-
- 6
1918
- 7
19+
## - 8
20+
21+
#
22+
# DISABLED
23+
#
24+
# - name: Ubuntu
25+
# versions:
26+
# - bionic
27+
# ## - focal
28+
2029
#
2130
# DISABLED
2231
#
23-
# - name: Ubuntu
24-
# versions:
25-
# - xenial
26-
# - bionic
2732
# - name: Fedora
2833
# versions:
2934
# - 27

0 commit comments

Comments
 (0)