Skip to content

Commit f413187

Browse files
authored
Merge branch 'ANXS:master' into master
2 parents 0324494 + b38e897 commit f413187

9 files changed

Lines changed: 1750 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
strategy:
4545
matrix:
4646
include:
47-
- distro: rockylinux8
48-
- distro: rockylinux9
47+
# - distro: rockylinux8
48+
# - distro: rockylinux9
4949
- distro: debian11
5050
- distro: debian12
5151
- distro: ubuntu2004
@@ -64,7 +64,7 @@ jobs:
6464
python-version: '3.x'
6565

6666
- name: Install test dependencies.
67-
run: pip3 install "ansible>9,<10" molecule molecule-plugins[docker] docker
67+
run: pip3 install "ansible>10,<12" molecule molecule-plugins[docker] docker
6868

6969
- name: Run Molecule tests.
7070
run: molecule -v test

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ An example how to include this role as a task:
5454

5555
#### Compatibility matrix
5656

57-
| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 |
58-
| ------------------------- | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
59-
| Debian 11.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
60-
| Debian 12.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
61-
| Rockylinux 8.x | :no_entry: | :warning: | :warning: | :warning: | :warning: | :warning: |
62-
| Rockylinux 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
63-
| Ubuntu 20.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
64-
| Ubuntu 22.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
57+
| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
58+
| ------------------------- | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
59+
| Debian 11.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
60+
| Debian 12.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
61+
| Rockylinux 8.x | :no_entry: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: |
62+
| Rockylinux 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: |
63+
| Ubuntu 20.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
64+
| Ubuntu 22.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
65+
| Ubuntu 24.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
6566

6667

6768
- :white_check_mark: - works fine
@@ -73,7 +74,7 @@ An example how to include this role as a task:
7374

7475
```yaml
7576
# Basic settings
76-
postgresql_version: 16
77+
postgresql_version: 17
7778
postgresql_encoding: "UTF-8"
7879
postgresql_locale: "en_US.UTF-8"
7980
postgresql_ctype: "en_US.UTF-8"

defaults/main.yml

Lines changed: 27 additions & 4 deletions
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: 16
4+
postgresql_version: 17
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
@@ -52,6 +52,7 @@ postgresql_postgis_release_compatibility:
5252
14: "3.2"
5353
15: "3.2"
5454
16: "3.4"
55+
17: "3.5"
5556

5657
postgresql_ext_postgis_version: "{{ postgresql_postgis_release_compatibility.get(postgresql_version) }}"
5758
postgresql_ext_postgis_version_terse: "{{ postgresql_ext_postgis_version | replace('.','') }}"
@@ -157,7 +158,7 @@ postgresql_client_connection_check_interval: 0 # (>= 14)
157158
postgresql_authentication_timeout: 60s # 1s-600s
158159
postgresql_password_encryption: "{{ 'scram-sha-256' if postgresql_version is version_compare('14', '>=') else 'md5' }}" # (>=14.0 set to scram-sha-256 for best security)
159160
posgresql_scram_iterations: 4096 # (>= 16)
160-
postgresql_db_user_namespace: off
161+
postgresql_db_user_namespace: off # (<= 16)
161162

162163
# GSSAPI using Kerberos
163164
postgresql_krb_server_keyfile: "{{ 'FILE:${sysconfdir}/krb5.keytab' if postgresql_version is version_compare('14', '>=') else '' }}"
@@ -217,15 +218,26 @@ postgresql_dynamic_shared_memory_type: "posix" # the default is the first optio
217218
# mmap
218219
# use none to disable dynamic shared memory
219220
postgresql_min_dynamic_shared_memory: 0MB # (>= 14) (change requires restart)
220-
postgres_vacuum_buffer_usage_limit: 256kB # (>= 16) size of vacuum and analyze buffer access strategy ring;
221+
postgresql_vacuum_buffer_usage_limit: "{{ '256kB' if postgresql_version is version_compare('16', '=') else '2MB' }}" # (>= 16) size of vacuum and analyze buffer access strategy ring;
221222
# 0 to disable vacuum buffer access strategy;
222223
# range 128kB to 16GB
223224

225+
# SLRU buffers (change requires restart)
226+
postgresql_commit_timestamp_buffers: 0 # (>= 17) memory for pg_commit_ts
227+
postgresql_multixact_offset_buffers: 16 # (>= 17) memory for pg_multixact/offsets
228+
postgresql_multixact_member_buffers: 32 # (>= 17) memory for pg_multixact/members
229+
postgresql_notify_buffers: 16 # (>= 17) memory for pg_notify
230+
postgresql_serializable_buffers: 32 # (>= 17) memory for pg_serial
231+
postgresql_subtransaction_buffers: 0 # (>= 17) memory for pg_subtrans (0 = auto)
232+
postgresql_transaction_buffers: 0 # (>= 17) memory for pg_xact (0 = auto)
233+
224234
# - Disk -
225235

226236
# limits per-process temp file space in kB, or -1 for no limit (>= 9.2)
227237
postgresql_temp_file_limit: -1
228238

239+
postgresql_max_notify_queue_pages: 1048576 # (>= 17)
240+
229241
# - Kernel Resources -
230242

231243
postgresql_max_files_per_process: 1000 # min 25, (>= 13) min 64
@@ -250,12 +262,13 @@ postgresql_bgwriter_flush_after: 512kB # measured in pages, 0 disables
250262
postgresql_backend_flush_after: 0 # (>= 9.6) 0 disables, default is 0
251263
postgresql_effective_io_concurrency: 1 # 1-1000; 0 disables prefetching
252264
postgresql_maintenance_io_concurrency: 10 # (>= 13)
265+
postgresql_io_combine_limit: 128kB # (>= 17) usually 1-32 blocks (depends on OS)
253266
postgresql_max_worker_processes: 8 # (change requires restart)
254267
postgresql_max_parallel_workers_per_gather: 2 # (>= 9.6) taken from max_worker_processes
255268
postgresql_max_parallel_maintenance_workers: 2 # (>= 11) taken from max_parallel_workers
256269
postgresql_max_parallel_workers: 8 # (>= 10)
257270
postgresql_parallel_leader_participation: on # (>= 11)
258-
postgresql_old_snapshot_threshold: -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
271+
postgresql_old_snapshot_threshold: -1 # (>= 9.6 and <= 16) 1min-60d; -1 disables; 0 is immediate
259272
# (change requires restart)
260273

261274
#------------------------------------------------------------------------------
@@ -325,6 +338,10 @@ postgresql_recovery_target_inclusive: "" # (>= 12)
325338
postgresql_recovery_target_timeline: "latest" # (>= 12)
326339
postgresql_recovery_target_action: "pause" # (>= 12)
327340

341+
# - WAL Summarization -
342+
postgresql_summarize_wal: off # (>= 17) run WAL summarizer process?
343+
postgresql_wal_summary_keep_time: 10d # (>= 17) when to remove old summary files, 0 = never
344+
328345
#------------------------------------------------------------------------------
329346
# REPLICATION
330347
#------------------------------------------------------------------------------
@@ -346,6 +363,7 @@ postgresql_track_commit_timestamp: off # (>= 9.5)
346363
# standby servers that provide sync rep.
347364
# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
348365
postgresql_synchronous_standby_names: [] # '*' means 'all'
366+
postgresql_synchronized_standby_slots: "" # (>= 17) streaming replication standby server slot
349367
postgresql_synchronous_standby_num_sync: "" # >= 9.6 (NOTE: If you use the ANY/ALL syntax in v10, then note the new variable below)
350368
postgresql_synchronous_standby_choose_sync: "FIRST" # >= 10
351369
# number of xacts by which cleanup is delayed
@@ -372,6 +390,7 @@ postgresql_wal_receiver_timeout: 60s
372390
# time to wait before retrying to retrieve WAL after a failed attempt
373391
postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
374392
postgresql_recovery_min_apply_delay: 0 # (>= 12)
393+
postgresql_sync_replication_slots: off # (>= 17) enables slot synchronization on the physical standby from the primary
375394

376395
# - Subscribers - (>= 10)
377396
# These settings are ignored on a publisher.
@@ -405,6 +424,7 @@ postgres_enable_presorted_aggregate: on # (>= 16)
405424
postgresql_enable_seqscan: on
406425
postgresql_enable_sort: on
407426
postgresql_enable_tidscan: on
427+
postgresql_enable_group_by_reordering: on
408428

409429
# - Planner Cost Constants -
410430
postgresql_seq_page_cost: 1.0 # measured on an arbitrary scale
@@ -669,6 +689,7 @@ postgresql_default_transaction_deferrable: off
669689
postgresql_session_replication_role: "origin"
670690

671691
postgresql_statement_timeout: 0 # in milliseconds, 0 is disabled
692+
postgresql_transaction_timeout: 0 # (>= 17) in milliseconds, 0 is disabled
672693
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled (>= 9.3)
673694
postgresql_idle_in_transaction_session_timeout: 0 # in milliseconds, 0 is disabled (>= 9.6)
674695
postgresql_idle_session_timeout: 0 # in milliseconds, 0 is disabled (>= 14)
@@ -684,6 +705,7 @@ postgresql_xmlbinary: "base64"
684705
postgresql_xmloption: "content"
685706
postgresql_gin_pending_list_limit: 4MB # (>= 9.5)
686707
postgresql_createrole_self_grant: '' # (>= 16) 'set', 'inherit' or 'set, inherit'
708+
postgresql_event_triggers: on # (>= 17)
687709

688710
# - Locale and Formatting -
689711

@@ -772,6 +794,7 @@ postgresql_sql_inheritance: on # (<= 9.6)
772794
# - Other Platforms and Clients -
773795

774796
postgresql_transform_null_equals: off
797+
postgresql_allow_alter_system: on # (>= 17)
775798

776799
#------------------------------------------------------------------------------
777800
# ERROR HANDLING

molecule/default/molecule.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ platforms:
4848
pre_build_image: true
4949
cgroupns_mode: host
5050
command: ${MOLECULE_DOCKER_COMMAND:-""}
51+
- name: postgresql-17
52+
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
53+
volumes:
54+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
55+
privileged: true
56+
pre_build_image: true
57+
cgroupns_mode: host
58+
command: ${MOLECULE_DOCKER_COMMAND:-""}
5159
provisioner:
5260
name: ansible
5361
config_options:
@@ -68,5 +76,7 @@ provisioner:
6876
postgresql_version: 15
6977
postgresql-16:
7078
postgresql_version: 16
79+
postgresql-17:
80+
postgresql_version: 17
7181
verifier:
7282
name: ansible

templates/postgresql.conf-16.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ dynamic_shared_memory_type = {{ postgresql_dynamic_shared_memory_type }} # the d
159159
# mmap
160160
# (change requires restart)
161161
min_dynamic_shared_memory = {{ postgresql_min_dynamic_shared_memory }} # (change requires restart)
162-
vacuum_buffer_usage_limit = {{ postgres_vacuum_buffer_usage_limit }} # size of vacuum and analyze buffer access strategy ring;
162+
vacuum_buffer_usage_limit = {{ postgresql_vacuum_buffer_usage_limit }} # size of vacuum and analyze buffer access strategy ring;
163163
# 0 to disable vacuum buffer access strategy;
164164
# range 128kB to 16GB
165165

0 commit comments

Comments
 (0)