11# file: postgresql/defaults/main.yml
22
33# Basic settings
4- postgresql_version : 16
4+ postgresql_version : 17
55postgresql_version_terse : " {{ postgresql_version | replace('.', '') }}" # Short version of the postgresql_version, used in some path and filenames
66postgresql_encoding : " UTF-8"
77postgresql_data_checksums : false
@@ -48,6 +48,7 @@ postgresql_postgis_release_compatibility:
4848 14 : " 3.2"
4949 15 : " 3.2"
5050 16 : " 3.4"
51+ 17 : " 3.5"
5152
5253postgresql_ext_postgis_version : " {{ postgresql_postgis_release_compatibility.get(postgresql_version) }}"
5354postgresql_ext_postgis_version_terse : " {{ postgresql_ext_postgis_version | replace('.','') }}"
@@ -153,7 +154,7 @@ postgresql_client_connection_check_interval: 0 # (>= 14)
153154postgresql_authentication_timeout : 60s # 1s-600s
154155postgresql_password_encryption : " {{ 'scram-sha-256' if postgresql_version is version_compare('14', '>=') else 'md5' }}" # (>=14.0 set to scram-sha-256 for best security)
155156posgresql_scram_iterations : 4096 # (>= 16)
156- postgresql_db_user_namespace : off
157+ postgresql_db_user_namespace : off # (<= 16)
157158
158159# GSSAPI using Kerberos
159160postgresql_krb_server_keyfile : " {{ 'FILE:${sysconfdir}/krb5.keytab' if postgresql_version is version_compare('14', '>=') else '' }}"
@@ -213,15 +214,26 @@ postgresql_dynamic_shared_memory_type: "posix" # the default is the first optio
213214 # mmap
214215 # use none to disable dynamic shared memory
215216postgresql_min_dynamic_shared_memory : 0MB # (>= 14) (change requires restart)
216- postgres_vacuum_buffer_usage_limit : 256kB # (>= 16) size of vacuum and analyze buffer access strategy ring;
217+ 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;
217218 # 0 to disable vacuum buffer access strategy;
218219 # range 128kB to 16GB
219220
221+ # SLRU buffers (change requires restart)
222+ postgresql_commit_timestamp_buffers : 0 # (>= 17) memory for pg_commit_ts
223+ postgresql_multixact_offset_buffers : 16 # (>= 17) memory for pg_multixact/offsets
224+ postgresql_multixact_member_buffers : 32 # (>= 17) memory for pg_multixact/members
225+ postgresql_notify_buffers : 16 # (>= 17) memory for pg_notify
226+ postgresql_serializable_buffers : 32 # (>= 17) memory for pg_serial
227+ postgresql_subtransaction_buffers : 0 # (>= 17) memory for pg_subtrans (0 = auto)
228+ postgresql_transaction_buffers : 0 # (>= 17) memory for pg_xact (0 = auto)
229+
220230# - Disk -
221231
222232# limits per-process temp file space in kB, or -1 for no limit (>= 9.2)
223233postgresql_temp_file_limit : -1
224234
235+ postgresql_max_notify_queue_pages : 1048576 # (>= 17)
236+
225237# - Kernel Resources -
226238
227239postgresql_max_files_per_process : 1000 # min 25, (>= 13) min 64
@@ -246,12 +258,13 @@ postgresql_bgwriter_flush_after: 512kB # measured in pages, 0 disables
246258postgresql_backend_flush_after : 0 # (>= 9.6) 0 disables, default is 0
247259postgresql_effective_io_concurrency : 1 # 1-1000; 0 disables prefetching
248260postgresql_maintenance_io_concurrency : 10 # (>= 13)
261+ postgresql_io_combine_limit : 128kB # (>= 17) usually 1-32 blocks (depends on OS)
249262postgresql_max_worker_processes : 8 # (change requires restart)
250263postgresql_max_parallel_workers_per_gather : 2 # (>= 9.6) taken from max_worker_processes
251264postgresql_max_parallel_maintenance_workers : 2 # (>= 11) taken from max_parallel_workers
252265postgresql_max_parallel_workers : 8 # (>= 10)
253266postgresql_parallel_leader_participation : on # (>= 11)
254- postgresql_old_snapshot_threshold : -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
267+ postgresql_old_snapshot_threshold : -1 # (>= 9.6 and <= 16 ) 1min-60d; -1 disables; 0 is immediate
255268 # (change requires restart)
256269
257270# ------------------------------------------------------------------------------
@@ -321,6 +334,10 @@ postgresql_recovery_target_inclusive: "" # (>= 12)
321334postgresql_recovery_target_timeline : " latest" # (>= 12)
322335postgresql_recovery_target_action : " pause" # (>= 12)
323336
337+ # - WAL Summarization -
338+ postgresql_summarize_wal : off # (>= 17) run WAL summarizer process?
339+ postgresql_wal_summary_keep_time : 10d # (>= 17) when to remove old summary files, 0 = never
340+
324341# ------------------------------------------------------------------------------
325342# REPLICATION
326343# ------------------------------------------------------------------------------
@@ -342,6 +359,7 @@ postgresql_track_commit_timestamp: off # (>= 9.5)
342359# standby servers that provide sync rep.
343360# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
344361postgresql_synchronous_standby_names : [] # '*' means 'all'
362+ postgresql_synchronized_standby_slots : " " # (>= 17) streaming replication standby server slot
345363postgresql_synchronous_standby_num_sync : " " # >= 9.6 (NOTE: If you use the ANY/ALL syntax in v10, then note the new variable below)
346364postgresql_synchronous_standby_choose_sync : " FIRST" # >= 10
347365# number of xacts by which cleanup is delayed
@@ -368,6 +386,7 @@ postgresql_wal_receiver_timeout: 60s
368386# time to wait before retrying to retrieve WAL after a failed attempt
369387postgresql_wal_retrieve_retry_interval : 5s # (>= 9.5)
370388postgresql_recovery_min_apply_delay : 0 # (>= 12)
389+ postgresql_sync_replication_slots : off # (>= 17) enables slot synchronization on the physical standby from the primary
371390
372391# - Subscribers - (>= 10)
373392# These settings are ignored on a publisher.
@@ -401,6 +420,7 @@ postgres_enable_presorted_aggregate: on # (>= 16)
401420postgresql_enable_seqscan : on
402421postgresql_enable_sort : on
403422postgresql_enable_tidscan : on
423+ postgresql_enable_group_by_reordering : on
404424
405425# - Planner Cost Constants -
406426postgresql_seq_page_cost : 1.0 # measured on an arbitrary scale
@@ -665,6 +685,7 @@ postgresql_default_transaction_deferrable: off
665685postgresql_session_replication_role : " origin"
666686
667687postgresql_statement_timeout : 0 # in milliseconds, 0 is disabled
688+ postgresql_transaction_timeout : 0 # (>= 17) in milliseconds, 0 is disabled
668689postgresql_lock_timeout : 0 # in milliseconds, 0 is disabled (>= 9.3)
669690postgresql_idle_in_transaction_session_timeout : 0 # in milliseconds, 0 is disabled (>= 9.6)
670691postgresql_idle_session_timeout : 0 # in milliseconds, 0 is disabled (>= 14)
@@ -680,6 +701,7 @@ postgresql_xmlbinary: "base64"
680701postgresql_xmloption : " content"
681702postgresql_gin_pending_list_limit : 4MB # (>= 9.5)
682703postgresql_createrole_self_grant : ' ' # (>= 16) 'set', 'inherit' or 'set, inherit'
704+ postgresql_event_triggers : on # (>= 17)
683705
684706# - Locale and Formatting -
685707
@@ -768,6 +790,7 @@ postgresql_sql_inheritance: on # (<= 9.6)
768790# - Other Platforms and Clients -
769791
770792postgresql_transform_null_equals : off
793+ postgresql_allow_alter_system : on # (>= 17)
771794
772795# ------------------------------------------------------------------------------
773796# ERROR HANDLING
0 commit comments