1
1
# file: postgresql/defaults/main.yml
2
2
3
3
# Basic settings
4
- postgresql_version : 12
4
+ postgresql_version : 13
5
5
postgresql_version_terse : " {{ postgresql_version | replace('.', '') }}" # Short version of the postgresql_version, used in some path and filenames
6
6
postgresql_encoding : " UTF-8"
7
7
postgresql_data_checksums : false
@@ -40,7 +40,16 @@ postgresql_ext_install_contrib: no
40
40
postgresql_ext_install_dev_headers : no
41
41
postgresql_ext_install_postgis : no
42
42
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('.','') }}"
44
53
45
54
postgresql_ext_postgis_deps :
46
55
- libgeos-c1
@@ -138,7 +147,7 @@ postgresql_ssl_ciphers:
138
147
- " @STRENGTH"
139
148
postgresql_ssl_prefer_server_ciphers : on
140
149
postgresql_ssl_ecdh_curve : " prime256v1"
141
- postgresql_ssl_min_protocol_version : " TLSv1" # (>= 12)
150
+ postgresql_ssl_min_protocol_version : " TLSv1.2 " # (>= 12)
142
151
postgresql_ssl_max_protocol_version : " " # (>= 12)
143
152
postgresql_ssl_dh_params_file : " " # (>= 10)
144
153
postgresql_ssl_passphrase_command : " " # (>= 11)
@@ -179,9 +188,11 @@ postgresql_temp_buffers: 8MB # min 800kB
179
188
postgresql_max_prepared_transactions : 0 # zero disables the feature
180
189
181
190
postgresql_work_mem : 1MB # min 64kB
191
+ postgresql_hash_mem_multiplier : 1.0 # (>= 13)
182
192
postgresql_maintenance_work_mem : 16MB # min 1MB
183
193
postgresql_replacement_sort_tuples : 150000 # (>= 9.6) limits use of replacement selection sort
184
194
postgresql_autovacuum_work_mem : -1 # min 1MB, or -1 to use maintenance_work_mem
195
+ postgresql_logical_decoding_work_mem : 64MB # (>= 13)
185
196
postgresql_max_stack_depth : 2MB # min 100kB
186
197
postgresql_shared_memory_type : " mmap" # (>= 12)
187
198
@@ -227,6 +238,7 @@ postgresql_bgwriter_flush_after: 0 # (>= 9.6) 0 disables,
227
238
# - Asynchronous Behavior -
228
239
229
240
postgresql_effective_io_concurrency : 1 # 1-1000; 0 disables prefetching
241
+ postgresql_maintenance_io_concurrency : 10 # (>= 13)
230
242
postgresql_max_worker_processes : 8 # (change requires restart)
231
243
postgresql_max_parallel_maintenance_workers : 2 # (>= 11) taken from max_parallel_workers
232
244
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
243
255
244
256
# - Settings -
245
257
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
247
259
postgresql_fsync : on # flush data to disk for crash safety
248
260
# (turning this off can cause
249
261
# unrecoverable data corruption)
@@ -274,6 +286,7 @@ postgresql_wal_recycle: on # recycle WAL files
274
286
postgresql_wal_buffers : -1 # min 32kB, -1 sets based on shared_buffers
275
287
postgresql_wal_writer_delay : 200ms # 1-10000 milliseconds
276
288
postgresql_wal_writer_flush_after : 1MB # (>= 9.6) 0 disables
289
+ postgresql_wal_skip_threshold : 2MB # (>= 13)
277
290
postgresql_commit_delay : 0 # range 0-100000, in microseconds
278
291
postgresql_commit_siblings : 5 # range 1-1000
279
292
@@ -321,6 +334,7 @@ postgresql_primary_slot_name: "" # (>= 12)
321
334
postgresql_promote_trigger_file : " " # (>= 12)
322
335
postgresql_recovery_min_apply_delay : 0 # (>= 12)
323
336
337
+
324
338
# ------------------------------------------------------------------------------
325
339
# REPLICATION
326
340
# ------------------------------------------------------------------------------
@@ -330,10 +344,13 @@ postgresql_recovery_min_apply_delay: 0 # (>= 12)
330
344
# Set these on the master and on any standby that will send replication data.
331
345
332
346
# max number of walsender processes
333
- postgresql_max_wal_senders : 0
347
+ postgresql_max_wal_senders : 10
334
348
postgresql_wal_sender_delay : 1s # walsender cycle time, 1-10000 milliseconds (<= 9.1)
335
349
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
+
337
354
postgresql_replication_timeout : 60s # in milliseconds; 0 disables (<= 9.2)
338
355
postgresql_wal_sender_timeout : 60s # in milliseconds; 0 disables (>= 9.3)
339
356
postgresql_max_replication_slots : 0 # max number of replication slots
@@ -362,6 +379,7 @@ postgresql_hot_standby: off
362
379
postgresql_max_standby_archive_delay : 30s # -1 allows indefinite delay
363
380
# max delay before canceling queries when reading streaming WAL;
364
381
postgresql_max_standby_streaming_delay : 30s # -1 allows indefinite delay
382
+ postgresql_wal_receiver_create_temp_slot : off # (>= 13)
365
383
# send replies at least this often
366
384
postgresql_wal_receiver_status_interval : 10s # 0 disables
367
385
# send info from standby to prevent query conflicts
@@ -397,6 +415,7 @@ postgresql_enable_nestloop: on
397
415
postgresql_enable_parallel_append : on # (>= 11)
398
416
postgresql_enable_seqscan : on
399
417
postgresql_enable_sort : on
418
+ postgresql_enable_incremental_sort : on # (>= 13)
400
419
postgresql_enable_tidscan : on
401
420
postgresql_enable_partitionwise_join : off # (>= 11)
402
421
postgresql_enable_partitionwise_aggregate : off # (>= 11)
@@ -533,6 +552,8 @@ postgresql_log_min_error_statement: "error"
533
552
# -1 is disabled, 0 logs all statements and their durations, > 0 logs only
534
553
# statements running at least this number of milliseconds
535
554
postgresql_log_min_duration_statement : -1
555
+ postgresql_log_min_duration_sample : -1 # (>= 13)
556
+ postgresql_log_statement_sample_rate : 1.0 # (>= 13)
536
557
postgresql_log_transaction_sample_rate : 0.0 # (>= 12)
537
558
538
559
@@ -573,6 +594,8 @@ postgresql_log_line_prefix: "%t "
573
594
574
595
# log lock waits >= deadlock_timeout
575
596
postgresql_log_lock_waits : off
597
+ postgresql_log_parameter_max_length : -1 # (>= 13)
598
+ postgresql_log_parameter_max_length_on_error : 0 # (>= 13)
576
599
postgresql_log_statement : " none" # none, ddl, mod, all
577
600
postgresql_log_replication_commands : off
578
601
# log temporary files equal or larger
@@ -619,10 +642,12 @@ postgresql_autovacuum_max_workers: 3
619
642
postgresql_autovacuum_naptime : 1min
620
643
# min number of row updates before vacuum
621
644
postgresql_autovacuum_vacuum_threshold : 50
645
+ postgresql_autovacuum_vacuum_insert_threshold : 1000 # (>= 13)
622
646
# min number of row updates before analyze
623
647
postgresql_autovacuum_analyze_threshold : 50
624
648
# fraction of table size before vacuum
625
649
postgresql_autovacuum_vacuum_scale_factor : 0.2
650
+ postgresql_autovacuum_vacuum_insert_scale_factor : 0.2 # (>= 13)
626
651
# fraction of table size before analyze
627
652
postgresql_autovacuum_analyze_scale_factor : 0.1
628
653
# maximum XID age before forced vacuum
@@ -666,7 +691,7 @@ postgresql_vacuum_multixact_freeze_table_age: 150000000 # (>= 9.3)
666
691
postgresql_bytea_output : " hex" # hex, escape
667
692
postgresql_xmlbinary : " base64"
668
693
postgresql_xmloption : " content"
669
- postgresql_gin_fuzzy_search_limit : 0 # (<= 9.2)
694
+ postgresql_gin_fuzzy_search_limit : 0 # (<= 9.2)
670
695
postgresql_gin_pending_list_limit : 4MB # (>= 9.5)
671
696
672
697
@@ -786,6 +811,7 @@ postgresql_pgtune_type: "Mixed"
786
811
# Maximum number of expected connections, if "no", default based on db type
787
812
postgresql_pgtune_connections : no
788
813
814
+
789
815
# ------------------------------------------------------------------------------
790
816
# INSTALL/REPO
791
817
# ------------------------------------------------------------------------------
0 commit comments