PostgreSQL

From Zabbix-ES
Jump to navigation Jump to search

pg_hba.conf

local   all             all                                       trust
host    all             all             127.0.0.1/32              trust
host    all             all             ::1/128                   trust
local   replication     all                                       peer

host    replication     replica         192.168.1.136/32          md5 

host    all                 all               192.168.1.0/24      md5
host    all                 powa              192.168.1.33/32     md5
host    all                 barman            192.168.1.32/32     md5
host    replication         streaming_barman  192.168.1.32/32     md5
host    all                 all               192.168.1.238/24    md5
host    all                 all               192.168.1.243/24    md5
host    all                 postgres          192.168.1.125/24    md5

postgres.conf

 listen_addresses = '*'                               # what IP address(es) to listen on;
 max_connections = 800                                # (change requires restart)
 shared_buffers = 4GB                                 # min 128kB
 work_mem = 512MB                                     # min 64kB
 dynamic_shared_memory_type = posix                   # the default is the first option
 max_files_per_process = 2000                         # min 25
 wal_level = replica                                  # minimal, replica, or logical
 max_wal_size = 2GB
 max_wal_senders = 10                                 # max number of walsender processes
 wal_keep_segments = 5000                             # in logfile segments; 0 disables
 hot_standby = on                                     # "off" disallows queries during recovery
 max_standby_archive_delay = 30s                      # max delay before canceling queries
 hot_standby_feedback = on                            # send info from standby to prevent
 log_destination = 'stderr'                           # Valid values are combinations of
 logging_collector = on                               # Enable capturing of stderr and csvlog
 log_directory = 'log'                                # directory where log files are written,
 log_filename = 'postgresql-%a.log'                   # log file name pattern,
 log_truncate_on_rotation = on                        # If on, an existing log file with the
 log_rotation_age = 1d                                # Automatic rotation of logfiles will
 log_rotation_size = 0                                # Automatic rotation of logfiles will
 client_min_messages = warning                        # values in order of decreasing detail:
 log_min_messages = fatal                             # values in order of decreasing detail:
 log_min_error_statement = fatal                      # values in order of decreasing detail:
 log_line_prefix = '%m [%p] '                         # special values:
 log_timezone = 'Europe/Madrid'
 vacuum_freeze_min_age  = 1000000
 datestyle = 'iso, mdy'
 timezone = 'Europe/Madrid'
 lc_messages = 'en_US.UTF-8'                         # locale for system error message
 lc_monetary = 'en_US.UTF-8'                         # locale for monetary formatting
 lc_numeric = 'en_US.UTF-8'                          # locale for number formatting
 lc_time = 'en_US.UTF-8'                             # locale for time formatting
 default_text_search_config = 'pg_catalog.english'
 pg_partman_bgw.interval = 3600
 pg_partman_bgw.role = 'zabbix'
 pg_partman_bgw.dbname = 'zabbix'