From 1ad701e2bee05eefbf8c30ba9a84119ef4b0e917 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 5 Feb 2023 22:02:46 +0200 Subject: [PATCH] postgres: rebase config to postgresql 15.1-1 --- roles/postgres/templates/postgresql.conf.j2 | 43 ++++++++++++++------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/roles/postgres/templates/postgresql.conf.j2 b/roles/postgres/templates/postgresql.conf.j2 index 58d082b5..843f8070 100644 --- a/roles/postgres/templates/postgresql.conf.j2 +++ b/roles/postgres/templates/postgresql.conf.j2 @@ -136,7 +136,7 @@ shared_buffers = {{ postgres_shared_buffers }} # min 128kB # Caution: it is not advisable to set max_prepared_transactions nonzero unless # you actively intend to use prepared transactions. work_mem = {{ postgres_work_mem }} # min 64kB -#hash_mem_multiplier = 1.0 # 1-1000.0 multiplier on hash table work_mem +#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem maintenance_work_mem = {{ postgres_maintenance_work_mem }} # min 1MB #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem #logical_decoding_work_mem = 64MB # min 64kB @@ -147,7 +147,7 @@ maintenance_work_mem = {{ postgres_maintenance_work_mem }} # min 1MB # sysv # windows # (change requires restart) -dynamic_shared_memory_type = posix # the default is the first option +dynamic_shared_memory_type = posix # the default is usually the first option # supported by the operating system: # posix # sysv @@ -219,7 +219,8 @@ dynamic_shared_memory_type = posix # the default is the first option #full_page_writes = on # recover from partial page writes #wal_log_hints = off # also do full page writes of non-critical updates # (change requires restart) -#wal_compression = off # enable compression of full-page writes +#wal_compression = off # enables compression of full-page writes; + # off, pglz, lz4, zstd, or on #wal_init_zero = on # zero-fill new WAL files #wal_recycle = on # recycle WAL files #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers @@ -240,10 +241,19 @@ dynamic_shared_memory_type = posix # the default is the first option max_wal_size = 1GB min_wal_size = 80MB +# - Prefetching during recovery - + +#recovery_prefetch = try # prefetch pages referenced in the WAL? +#wal_decode_buffer_size = 512kB # lookahead window used for prefetching + # (change requires restart) + # - Archiving - #archive_mode = off # enables archiving; off, on, or always # (change requires restart) +#archive_library = '' # library to use to archive a logfile segment + # (empty string indicates archive_command should + # be used) #archive_command = '' # command to use to archive a logfile segment # placeholders: %p = path of file to archive # %f = file name only @@ -422,6 +432,7 @@ jit = {{ postgres_jit }} # allow JIT compilation # JOIN clauses #plan_cache_mode = auto # auto, force_generic_plan or # force_custom_plan +#recursive_worktable_factor = 10.0 # range 0.001-1000000 #------------------------------------------------------------------------------ @@ -431,14 +442,15 @@ jit = {{ postgres_jit }} # allow JIT compilation # - Where to Log - log_destination = 'syslog' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. + # stderr, csvlog, jsonlog, syslog, and + # eventlog, depending on platform. + # csvlog and jsonlog require + # logging_collector to be on. # This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. +#logging_collector = off # Enable capturing of stderr, jsonlog, + # and csvlog into log files. Required + # to be on for csvlogs and jsonlogs. # (change requires restart) # These are only used if logging_collector is on: @@ -522,18 +534,23 @@ syslog_split_messages = off # are logged regardless of their duration; 1.0 logs all # statements from all transactions, 0.0 never logs +#log_startup_progress_interval = 10s # Time between progress updates for + # long-running startup operations. + # 0 disables the feature, > 0 indicates + # the interval in milliseconds. + # - What to Log - #debug_print_parse = off #debug_print_rewritten = off #debug_print_plan = off #debug_pretty_print = on -#log_autovacuum_min_duration = -1 # log autovacuum activity; +#log_autovacuum_min_duration = 10min # log autovacuum activity; # -1 disables, 0 logs all actions and # their durations, > 0 logs only # actions running at least this number # of milliseconds. -#log_checkpoints = off +#log_checkpoints = on #log_connections = off #log_disconnections = off #log_duration = off @@ -593,7 +610,7 @@ log_timezone = 'UTC' # STATISTICS #------------------------------------------------------------------------------ -# - Query and Index Statistics Collector - +# - Cumulative Query and Index Statistics - #track_activities = on #track_activity_query_size = 1024 # (change requires restart) @@ -601,7 +618,7 @@ log_timezone = 'UTC' #track_io_timing = off #track_wal_io_timing = off #track_functions = none # none, pl, all -#stats_temp_directory = 'pg_stat_tmp' +#stats_fetch_consistency = cache # - Monitoring -