]> git.ekhem.eu.org Git - server.git/commitdiff
Update postgres version from 13 to 15.
authorJakub Czajka <jakub@ekhem.eu.org>
Sun, 15 Oct 2023 22:56:27 +0000 (00:56 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Sun, 3 Dec 2023 21:55:24 +0000 (22:55 +0100)
postgres/pg_hba.conf [changed mode: 0644->0755]
postgres/postgresql.conf

old mode 100644 (file)
new mode 100755 (executable)
index bd66d91..08a9f3c
 #
 # (The uppercase items must be replaced by actual values.)
 #
-# The first field is the connection type: "local" is a Unix-domain
-# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
-# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
-# non-SSL TCP/IP socket.  Similarly, "hostgssenc" uses a
-# GSSAPI-encrypted TCP/IP socket, while "hostnogssenc" uses a
-# non-GSSAPI socket.
+# The first field is the connection type:
+# - "local" is a Unix-domain socket
+# - "host" is a TCP/IP socket (encrypted or not)
+# - "hostssl" is a TCP/IP socket that is SSL-encrypted
+# - "hostnossl" is a TCP/IP socket that is not SSL-encrypted
+# - "hostgssenc" is a TCP/IP socket that is GSSAPI-encrypted
+# - "hostnogssenc" is a TCP/IP socket that is not GSSAPI-encrypted
 #
 # DATABASE can be "all", "sameuser", "samerole", "replication", a
 # database name, or a comma-separated list thereof. The "all"
@@ -98,9 +99,13 @@ host    gym_db          gym_tracker     ::/0                    md5
 local   matrix_db       synapse_user                            trust
 # "local" is for Unix domain socket connections only
 local   all             all                                     peer
+# IPv4 local connections:
+host    all             all             127.0.0.1/32            scram-sha-256
+# IPv6 local connections:
+host    all             all             ::1/128                 scram-sha-256
 # Allow replication connections from localhost, by a user with the
 # replication privilege.
 local   replication     all                                     peer
-host    replication     all             127.0.0.1/32            md5
-host    replication     all             ::1/128                 md5
+host    replication     all             127.0.0.1/32            scram-sha-256
+host    replication     all             ::1/128                 scram-sha-256
 hostssl all             postgres        0.0.0.0/0               cert
index bfe0d767840b5874f8f84286c5d71b3e299797c8..308a6a65b79e539fbd8d7e4cf372dc49ddb11c5b 100644 (file)
 # The default values of these variables are driven from the -D command-line
 # option or PGDATA environment variable, represented here as ConfigDir.
 
-data_directory = '/var/lib/postgresql/13/main'         # use data in another directory
+data_directory = '/var/lib/postgresql/15/main'         # use data in another directory
                                        # (change requires restart)
-hba_file = '/etc/postgresql/13/main/pg_hba.conf'       # host-based authentication file
+hba_file = '/etc/postgresql/15/main/pg_hba.conf'       # host-based authentication file
                                        # (change requires restart)
-ident_file = '/etc/postgresql/13/main/pg_ident.conf'   # ident configuration file
+ident_file = '/etc/postgresql/15/main/pg_ident.conf'   # ident configuration file
                                        # (change requires restart)
 
 # If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '/var/run/postgresql/13-main.pid'                  # write an extra PID file
+external_pid_file = '/var/run/postgresql/15-main.pid'                  # write an extra PID file
                                        # (change requires restart)
 
 
@@ -86,10 +86,14 @@ unix_socket_directories = '/var/run/postgresql'     # comma-separated list of direct
 #tcp_user_timeout = 0                  # TCP_USER_TIMEOUT, in milliseconds;
                                        # 0 selects the system default
 
+#client_connection_check_interval = 0  # time between checks for client
+                                       # disconnection while running queries;
+                                       # 0 for never
+
 # - Authentication -
 
 #authentication_timeout = 1min         # 1s-600s
-#password_encryption = md5             # md5 or scram-sha-256
+#password_encryption = scram-sha-256   # scram-sha-256 or md5
 #db_user_namespace = off
 
 # GSSAPI using Kerberos
@@ -99,10 +103,10 @@ unix_socket_directories = '/var/run/postgresql'    # comma-separated list of direct
 # - SSL -
 
 ssl = on
-ssl_ca_file = '/etc/postgresql/13/main/private/psql.crt'
-ssl_cert_file = '/etc/postgresql/13/main/private/fullchain.pem'
+ssl_ca_file = '/etc/postgresql/15/main/private/psql.crt'
+ssl_cert_file = '/etc/postgresql/15/main/private/fullchain.pem'
 #ssl_crl_file = ''
-ssl_key_file = '/etc/postgresql/13/main/private/privkey.pem'
+ssl_key_file = '/etc/postgresql/15/main/private/privkey.pem'
 #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
 #ssl_prefer_server_ciphers = on
 #ssl_ecdh_curve = 'prime256v1'
@@ -123,13 +127,15 @@ shared_buffers = 128MB                    # min 128kB
                                        # (change requires restart)
 #huge_pages = try                      # on, off, or try
                                        # (change requires restart)
+#huge_page_size = 0                    # zero for system default
+                                       # (change requires restart)
 #temp_buffers = 8MB                    # min 800kB
 #max_prepared_transactions = 0         # zero disables the feature
                                        # (change requires restart)
 # Caution: it is not advisable to set max_prepared_transactions nonzero unless
 # you actively intend to use prepared transactions.
 #work_mem = 4MB                                # 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 = 64MB           # min 1MB
 #autovacuum_work_mem = -1              # min 1MB, or -1 to use maintenance_work_mem
 #logical_decoding_work_mem = 64MB      # min 64kB
@@ -140,13 +146,14 @@ shared_buffers = 128MB                    # min 128kB
                                        #   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
                                        #   windows
                                        #   mmap
                                        # (change requires restart)
+#min_dynamic_shared_memory = 0MB       # (change requires restart)
 
 # - Disk -
 
@@ -162,7 +169,7 @@ dynamic_shared_memory_type = posix  # the default is the first option
 
 #vacuum_cost_delay = 0                 # 0-100 milliseconds (0 disables)
 #vacuum_cost_page_hit = 1              # 0-10000 credits
-#vacuum_cost_page_miss = 10            # 0-10000 credits
+#vacuum_cost_page_miss =             # 0-10000 credits
 #vacuum_cost_page_dirty = 20           # 0-10000 credits
 #vacuum_cost_limit = 200               # 1-10000 credits
 
@@ -175,17 +182,17 @@ dynamic_shared_memory_type = posix        # the default is the first option
 
 # - Asynchronous Behavior -
 
+#backend_flush_after = 0               # measured in pages, 0 disables
 #effective_io_concurrency = 1          # 1-1000; 0 disables prefetching
 #maintenance_io_concurrency = 10       # 1-1000; 0 disables prefetching
 #max_worker_processes = 8              # (change requires restart)
-#max_parallel_maintenance_workers = 2  # taken from max_parallel_workers
 #max_parallel_workers_per_gather = 2   # taken from max_parallel_workers
-#parallel_leader_participation = on
+#max_parallel_maintenance_workers = 2  # taken from max_parallel_workers
 #max_parallel_workers = 8              # maximum number of max_worker_processes that
                                        # can be used in parallel operations
+#parallel_leader_participation = on
 #old_snapshot_threshold = -1           # 1min-60d; -1 disables; 0 is immediate
                                        # (change requires restart)
-#backend_flush_after = 0               # measured in pages, 0 disables
 
 
 #------------------------------------------------------------------------------
@@ -209,9 +216,10 @@ dynamic_shared_memory_type = posix # the default is the first option
                                        #   fsync_writethrough
                                        #   open_sync
 #full_page_writes = on                 # recover from partial page writes
-#wal_compression = off                 # enable compression of full-page writes
 #wal_log_hints = off                   # also do full page writes of non-critical updates
                                        # (change requires restart)
+#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
@@ -226,16 +234,25 @@ dynamic_shared_memory_type = posix        # the default is the first option
 # - Checkpoints -
 
 #checkpoint_timeout = 5min             # range 30s-1d
-max_wal_size = 1GB
-min_wal_size = 80MB
-#checkpoint_completion_target = 0.5    # checkpoint target duration, 0.0 - 1.0
+#checkpoint_completion_target = 0.9    # checkpoint target duration, 0.0 - 1.0
 #checkpoint_flush_after = 256kB                # measured in pages, 0 disables
 #checkpoint_warning = 30s              # 0 disables
+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
@@ -251,7 +268,6 @@ min_wal_size = 80MB
                                # placeholders: %p = path of file to restore
                                #               %f = file name only
                                # e.g. 'cp /mnt/server/archivedir/%f %p'
-                               # (change requires restart)
 #archive_cleanup_command = ''  # command to execute at every restartpoint
 #recovery_end_command = ''     # command to execute at completion of recovery
 
@@ -286,20 +302,19 @@ min_wal_size = 80MB
 
 # - Sending Servers -
 
-# Set these on the master and on any standby that will send replication data.
+# Set these on the primary and on any standby that will send replication data.
 
 #max_wal_senders = 10          # max number of walsender processes
                                # (change requires restart)
+#max_replication_slots = 10    # max number of replication slots
+                               # (change requires restart)
 #wal_keep_size = 0             # in megabytes; 0 disables
 #max_slot_wal_keep_size = -1   # in megabytes; -1 disables
 #wal_sender_timeout = 60s      # in milliseconds; 0 disables
-
-#max_replication_slots = 10    # max number of replication slots
-                               # (change requires restart)
 #track_commit_timestamp = off  # collect timestamp of transaction commit
                                # (change requires restart)
 
-# - Master Server -
+# - Primary Server -
 
 # These settings are ignored on a standby server.
 
@@ -311,7 +326,7 @@ min_wal_size = 80MB
 
 # - Standby Servers -
 
-# These settings are ignored on a master server.
+# These settings are ignored on a primary server.
 
 #primary_conninfo = ''                 # connection string to sending server
 #primary_slot_name = ''                        # replication slot on sending server
@@ -331,7 +346,7 @@ min_wal_size = 80MB
 #hot_standby_feedback = off            # send info from standby to prevent
                                        # query conflicts
 #wal_receiver_timeout = 60s            # time that receiver waits for
-                                       # communication from master
+                                       # communication from primary
                                        # in milliseconds; 0 disables
 #wal_retrieve_retry_interval = 5s      # time to wait before retrying to
                                        # retrieve WAL after a failed attempt
@@ -352,23 +367,26 @@ min_wal_size = 80MB
 
 # - Planner Method Configuration -
 
+#enable_async_append = on
 #enable_bitmapscan = on
+#enable_gathermerge = on
 #enable_hashagg = on
 #enable_hashjoin = on
+#enable_incremental_sort = on
 #enable_indexscan = on
 #enable_indexonlyscan = on
 #enable_material = on
+#enable_memoize = on
 #enable_mergejoin = on
 #enable_nestloop = on
 #enable_parallel_append = on
+#enable_parallel_hash = on
+#enable_partition_pruning = on
+#enable_partitionwise_join = off
+#enable_partitionwise_aggregate = off
 #enable_seqscan = on
 #enable_sort = on
-#enable_incremental_sort = on
 #enable_tidscan = on
-#enable_partitionwise_join = off
-#enable_partitionwise_aggregate = off
-#enable_parallel_hash = on
-#enable_partition_pruning = on
 
 # - Planner Cost Constants -
 
@@ -377,8 +395,11 @@ min_wal_size = 80MB
 #cpu_tuple_cost = 0.01                 # same scale as above
 #cpu_index_tuple_cost = 0.005          # same scale as above
 #cpu_operator_cost = 0.0025            # same scale as above
-#parallel_tuple_cost = 0.1             # same scale as above
 #parallel_setup_cost = 1000.0  # same scale as above
+#parallel_tuple_cost = 0.1             # same scale as above
+#min_parallel_table_scan_size = 8MB
+#min_parallel_index_scan_size = 512kB
+#effective_cache_size = 4GB
 
 #jit_above_cost = 100000               # perform JIT compilation if available
                                        # and query more expensive than this;
@@ -389,10 +410,6 @@ min_wal_size = 80MB
                                        # query is more expensive than this;
                                        # -1 disables
 
-#min_parallel_table_scan_size = 8MB
-#min_parallel_index_scan_size = 512kB
-#effective_cache_size = 4GB
-
 # - Genetic Query Optimizer -
 
 #geqo = on
@@ -409,12 +426,12 @@ min_wal_size = 80MB
 #constraint_exclusion = partition      # on, off, or partition
 #cursor_tuple_fraction = 0.1           # range 0.0-1.0
 #from_collapse_limit = 8
+#jit = on                              # allow JIT compilation
 #join_collapse_limit = 8               # 1 disables collapsing of explicit
                                        # JOIN clauses
-#force_parallel_mode = off
-#jit = on                              # allow JIT compilation
 #plan_cache_mode = auto                        # auto, force_generic_plan or
                                        # force_custom_plan
+#recursive_worktable_factor = 10.0     # range 0.001-1000000
 
 
 #------------------------------------------------------------------------------
@@ -424,14 +441,15 @@ min_wal_size = 80MB
 # - Where to Log -
 
 #log_destination = 'stderr'            # 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:
@@ -441,6 +459,11 @@ min_wal_size = 80MB
                                        # can include strftime() escapes
 #log_file_mode = 0600                  # creation mode for log files,
                                        # begin with 0 to use octal notation
+#log_rotation_age = 1d                 # Automatic rotation of logfiles will
+                                       # happen after that time.  0 disables.
+#log_rotation_size = 10MB              # Automatic rotation of logfiles will
+                                       # happen after that much log output.
+                                       # 0 disables.
 #log_truncate_on_rotation = off                # If on, an existing log file with the
                                        # same name as the new log file will be
                                        # truncated rather than appended to.
@@ -449,11 +472,6 @@ min_wal_size = 80MB
                                        # or size-driven rotation.  Default is
                                        # off, meaning append to existing files
                                        # in all cases.
-#log_rotation_age = 1d                 # Automatic rotation of logfiles will
-                                       # happen after that time.  0 disables.
-#log_rotation_size = 10MB              # Automatic rotation of logfiles will
-                                       # happen after that much log output.
-                                       # 0 disables.
 
 # These are relevant when logging to syslog:
 #syslog_facility = 'LOCAL0'
@@ -461,7 +479,7 @@ min_wal_size = 80MB
 #syslog_sequence_numbers = on
 #syslog_split_messages = on
 
-# This is only relevant when logging to eventlog (win32):
+# This is only relevant when logging to eventlog (Windows):
 # (change requires restart)
 #event_source = 'PostgreSQL'
 
@@ -515,13 +533,23 @@ min_wal_size = 80MB
                                        # 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_checkpoints = off
+#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 = on
 #log_connections = off
 #log_disconnections = off
 #log_duration = off
@@ -535,9 +563,11 @@ log_line_prefix = '%m [%p] %q%u@%d '               # special values:
                                        #   %h = remote host
                                        #   %b = backend type
                                        #   %p = process ID
+                                       #   %P = process ID of parallel group leader
                                        #   %t = timestamp without milliseconds
                                        #   %m = timestamp with milliseconds
                                        #   %n = timestamp with milliseconds (as a Unix epoch)
+                                       #   %Q = query ID (0 if none or not computed)
                                        #   %i = command tag
                                        #   %e = SQL state
                                        #   %c = session ID
@@ -550,6 +580,8 @@ log_line_prefix = '%m [%p] %q%u@%d '                # special values:
                                        #   %% = '%'
                                        # e.g. '<%u%%%d> '
 #log_lock_waits = off                  # log lock waits >= deadlock_timeout
+#log_recovery_conflict_waits = off     # log standby recovery conflict waits
+                                       # >= deadlock_timeout
 #log_parameter_max_length = -1         # when logging statements, limit logged
                                        # bind-parameter values to N bytes;
                                        # -1 means print in full, 0 disables
@@ -567,7 +599,7 @@ log_timezone = 'Europe/Warsaw'
 # PROCESS TITLE
 #------------------------------------------------------------------------------
 
-cluster_name = '13/main'                       # added to process titles if nonempty
+cluster_name = '15/main'                       # added to process titles if nonempty
                                        # (change requires restart)
 #update_process_title = on
 
@@ -576,22 +608,24 @@ cluster_name = '13/main'                  # added to process titles if nonempty
 # STATISTICS
 #------------------------------------------------------------------------------
 
-# - Query and Index Statistics Collector -
+# - Cumulative Query and Index Statistics -
 
 #track_activities = on
+#track_activity_query_size = 1024      # (change requires restart)
 #track_counts = on
 #track_io_timing = off
+#track_wal_io_timing = off
 #track_functions = none                        # none, pl, all
-#track_activity_query_size = 1024      # (change requires restart)
-stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
+#stats_fetch_consistency = cache
 
 
 # - Monitoring -
 
+#compute_query_id = auto
+#log_statement_stats = off
 #log_parser_stats = off
 #log_planner_stats = off
 #log_executor_stats = off
-#log_statement_stats = off
 
 
 #------------------------------------------------------------------------------
@@ -600,10 +634,6 @@ stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
 
 #autovacuum = on                       # Enable autovacuum subprocess?  'on'
                                        # requires track_counts to also be on.
-#log_autovacuum_min_duration = -1      # -1 disables, 0 logs all actions and
-                                       # their durations, > 0 logs only
-                                       # actions running at least this number
-                                       # of milliseconds.
 #autovacuum_max_workers = 3            # max number of autovacuum subprocesses
                                        # (change requires restart)
 #autovacuum_naptime = 1min             # time between autovacuum runs
@@ -649,10 +679,11 @@ stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
                                        #   error
 #search_path = '"$user", public'       # schema names
 #row_security = on
+#default_table_access_method = 'heap'
 #default_tablespace = ''               # a tablespace name, '' uses the default
+#default_toast_compression = 'pglz'    # 'pglz' or 'lz4'
 #temp_tablespaces = ''                 # a list of tablespace names, '' uses
                                        # only default tablespace
-#default_table_access_method = 'heap'
 #check_function_bodies = on
 #default_transaction_isolation = 'read committed'
 #default_transaction_read_only = off
@@ -661,17 +692,16 @@ stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
 #statement_timeout = 0                 # in milliseconds, 0 is disabled
 #lock_timeout = 0                      # in milliseconds, 0 is disabled
 #idle_in_transaction_session_timeout = 0       # in milliseconds, 0 is disabled
-#vacuum_freeze_min_age = 50000000
+#idle_session_timeout = 0              # in milliseconds, 0 is disabled
 #vacuum_freeze_table_age = 150000000
-#vacuum_multixact_freeze_min_age = 5000000
+#vacuum_freeze_min_age = 50000000
+#vacuum_failsafe_age = 1600000000
 #vacuum_multixact_freeze_table_age = 150000000
-#vacuum_cleanup_index_scale_factor = 0.1       # fraction of total number of tuples
-                                               # before index cleanup, 0 always performs
-                                               # index cleanup
+#vacuum_multixact_freeze_min_age = 5000000
+#vacuum_multixact_failsafe_age = 1600000000
 #bytea_output = 'hex'                  # hex, escape
 #xmlbinary = 'base64'
 #xmloption = 'content'
-#gin_fuzzy_search_limit = 0
 #gin_pending_list_limit = 4MB
 
 # - Locale and Formatting -
@@ -703,9 +733,9 @@ default_text_search_config = 'pg_catalog.english'
 
 # - Shared Library Preloading -
 
-#shared_preload_libraries = '' # (change requires restart)
 #local_preload_libraries = ''
 #session_preload_libraries = ''
+#shared_preload_libraries = '' # (change requires restart)
 #jit_provider = 'llvmjit'              # JIT library to use
 
 # - Other Defaults -
@@ -713,6 +743,7 @@ default_text_search_config = 'pg_catalog.english'
 #dynamic_library_path = '$libdir'
 #extension_destdir = ''                        # prepend path when loading extensions
                                        # and shared objects (added by Debian)
+#gin_fuzzy_search_limit = 0
 
 
 #------------------------------------------------------------------------------
@@ -740,7 +771,6 @@ default_text_search_config = 'pg_catalog.english'
 #backslash_quote = safe_encoding       # on, off, or safe_encoding
 #escape_string_warning = on
 #lo_compat_privileges = off
-#operator_precedence_warning = off
 #quote_all_identifiers = off
 #standard_conforming_strings = on
 #synchronize_seqscans = on
@@ -759,6 +789,7 @@ default_text_search_config = 'pg_catalog.english'
 #data_sync_retry = off                 # retry or panic on failure to fsync
                                        # data?
                                        # (change requires restart)
+#recovery_init_sync_method = fsync     # fsync, syncfs (Linux 5.8+)
 
 
 #------------------------------------------------------------------------------