Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pg17 #590

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

Pg17 #590

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# file: postgresql/defaults/main.yml

# Basic settings
postgresql_version: 16
postgresql_version: 17
postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}" # Short version of the postgresql_version, used in some path and filenames
postgresql_encoding: "UTF-8"
postgresql_data_checksums: false
Expand Down Expand Up @@ -48,6 +48,7 @@ postgresql_postgis_release_compatibility:
14: "3.2"
15: "3.2"
16: "3.4"
17: "3.5"

postgresql_ext_postgis_version: "{{ postgresql_postgis_release_compatibility.get(postgresql_version) }}"
postgresql_ext_postgis_version_terse: "{{ postgresql_ext_postgis_version | replace('.','') }}"
Expand Down Expand Up @@ -153,7 +154,7 @@ postgresql_client_connection_check_interval: 0 # (>= 14)
postgresql_authentication_timeout: 60s # 1s-600s
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)
posgresql_scram_iterations: 4096 # (>= 16)
postgresql_db_user_namespace: off
postgresql_db_user_namespace: off # (<= 16)

# GSSAPI using Kerberos
postgresql_krb_server_keyfile: "{{ 'FILE:${sysconfdir}/krb5.keytab' if postgresql_version is version_compare('14', '>=') else '' }}"
Expand Down Expand Up @@ -213,15 +214,26 @@ postgresql_dynamic_shared_memory_type: "posix" # the default is the first optio
# mmap
# use none to disable dynamic shared memory
postgresql_min_dynamic_shared_memory: 0MB # (>= 14) (change requires restart)
postgres_vacuum_buffer_usage_limit: 256kB # (>= 16) size of vacuum and analyze buffer access strategy ring;
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;
# 0 to disable vacuum buffer access strategy;
# range 128kB to 16GB

# SLRU buffers (change requires restart)
postgresql_commit_timestamp_buffers: 0 # (>= 17) memory for pg_commit_ts
postgresql_multixact_offset_buffers: 16 # (>= 17) memory for pg_multixact/offsets
postgresql_multixact_member_buffers: 32 # (>= 17) memory for pg_multixact/members
postgresql_notify_buffers: 16 # (>= 17) memory for pg_notify
postgresql_serializable_buffers: 32 # (>= 17) memory for pg_serial
postgresql_subtransaction_buffers: 0 # (>= 17) memory for pg_subtrans (0 = auto)
postgresql_transaction_buffers: 0 # (>= 17) memory for pg_xact (0 = auto)

# - Disk -

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

postgresql_max_notify_queue_pages: 1048576 # (>= 17)

# - Kernel Resources -

postgresql_max_files_per_process: 1000 # min 25, (>= 13) min 64
Expand All @@ -246,12 +258,13 @@ postgresql_bgwriter_flush_after: 512kB # measured in pages, 0 disables
postgresql_backend_flush_after: 0 # (>= 9.6) 0 disables, default is 0
postgresql_effective_io_concurrency: 1 # 1-1000; 0 disables prefetching
postgresql_maintenance_io_concurrency: 10 # (>= 13)
postgresql_io_combine_limit: 128kB # (>= 17) usually 1-32 blocks (depends on OS)
postgresql_max_worker_processes: 8 # (change requires restart)
postgresql_max_parallel_workers_per_gather: 2 # (>= 9.6) taken from max_worker_processes
postgresql_max_parallel_maintenance_workers: 2 # (>= 11) taken from max_parallel_workers
postgresql_max_parallel_workers: 8 # (>= 10)
postgresql_parallel_leader_participation: on # (>= 11)
postgresql_old_snapshot_threshold: -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
postgresql_old_snapshot_threshold: -1 # (>= 9.6 and <= 16) 1min-60d; -1 disables; 0 is immediate
# (change requires restart)

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -321,6 +334,10 @@ postgresql_recovery_target_inclusive: "" # (>= 12)
postgresql_recovery_target_timeline: "latest" # (>= 12)
postgresql_recovery_target_action: "pause" # (>= 12)

# - WAL Summarization -
postgresql_summarize_wal: off # (>= 17) run WAL summarizer process?
postgresql_wal_summary_keep_time: 10d # (>= 17) when to remove old summary files, 0 = never

#------------------------------------------------------------------------------
# REPLICATION
#------------------------------------------------------------------------------
Expand All @@ -342,6 +359,7 @@ postgresql_track_commit_timestamp: off # (>= 9.5)
# standby servers that provide sync rep.
# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
postgresql_synchronous_standby_names: [] # '*' means 'all'
postgresql_synchronized_standby_slots: "" # (>= 17) streaming replication standby server slot
postgresql_synchronous_standby_num_sync: "" # >= 9.6 (NOTE: If you use the ANY/ALL syntax in v10, then note the new variable below)
postgresql_synchronous_standby_choose_sync: "FIRST" # >= 10
# number of xacts by which cleanup is delayed
Expand All @@ -368,6 +386,7 @@ postgresql_wal_receiver_timeout: 60s
# time to wait before retrying to retrieve WAL after a failed attempt
postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
postgresql_recovery_min_apply_delay: 0 # (>= 12)
postgresql_sync_replication_slots: off # (>= 17) enables slot synchronization on the physical standby from the primary

# - Subscribers - (>= 10)
# These settings are ignored on a publisher.
Expand Down Expand Up @@ -401,6 +420,7 @@ postgres_enable_presorted_aggregate: on # (>= 16)
postgresql_enable_seqscan: on
postgresql_enable_sort: on
postgresql_enable_tidscan: on
postgresql_enable_group_by_reordering: on

# - Planner Cost Constants -
postgresql_seq_page_cost: 1.0 # measured on an arbitrary scale
Expand Down Expand Up @@ -665,6 +685,7 @@ postgresql_default_transaction_deferrable: off
postgresql_session_replication_role: "origin"

postgresql_statement_timeout: 0 # in milliseconds, 0 is disabled
postgresql_transaction_timeout: 0 # (>= 17) in milliseconds, 0 is disabled
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled (>= 9.3)
postgresql_idle_in_transaction_session_timeout: 0 # in milliseconds, 0 is disabled (>= 9.6)
postgresql_idle_session_timeout: 0 # in milliseconds, 0 is disabled (>= 14)
Expand All @@ -680,6 +701,7 @@ postgresql_xmlbinary: "base64"
postgresql_xmloption: "content"
postgresql_gin_pending_list_limit: 4MB # (>= 9.5)
postgresql_createrole_self_grant: '' # (>= 16) 'set', 'inherit' or 'set, inherit'
postgresql_event_triggers: on # (>= 17)

# - Locale and Formatting -

Expand Down Expand Up @@ -768,6 +790,7 @@ postgresql_sql_inheritance: on # (<= 9.6)
# - Other Platforms and Clients -

postgresql_transform_null_equals: off
postgresql_allow_alter_system: on # (>= 17)

#------------------------------------------------------------------------------
# ERROR HANDLING
Expand Down
10 changes: 10 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ platforms:
pre_build_image: true
cgroupns_mode: host
command: ${MOLECULE_DOCKER_COMMAND:-""}
- name: postgresql-17
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true
cgroupns_mode: host
command: ${MOLECULE_DOCKER_COMMAND:-""}
provisioner:
name: ansible
config_options:
Expand All @@ -68,5 +76,7 @@ provisioner:
postgresql_version: 15
postgresql-16:
postgresql_version: 16
postgresql-17:
postgresql_version: 17
verifier:
name: ansible
2 changes: 1 addition & 1 deletion templates/postgresql.conf-16.j2
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ dynamic_shared_memory_type = {{ postgresql_dynamic_shared_memory_type }} # the d
# mmap
# (change requires restart)
min_dynamic_shared_memory = {{ postgresql_min_dynamic_shared_memory }} # (change requires restart)
vacuum_buffer_usage_limit = {{ postgres_vacuum_buffer_usage_limit }} # size of vacuum and analyze buffer access strategy ring;
vacuum_buffer_usage_limit = {{ postgresql_vacuum_buffer_usage_limit }} # size of vacuum and analyze buffer access strategy ring;
# 0 to disable vacuum buffer access strategy;
# range 128kB to 16GB

Expand Down
Loading
Loading