Перейти к содержанию

Приложение 14. Конфигурационный файл postgresql.conf

Пример конфигурационного файла postgresql.conf

listen_addresses = '*'
max_connections = 100                   # (change requires restart)
shared_buffers = 128MB                  # min 128kB
dynamic_shared_memory_type = posix      # the default is the first option
max_wal_size = 1GB
min_wal_size = 80MB
datestyle = 'iso, mdy'
timezone = 'Europe/Moscow'
lc_messages = 'en_US.utf8'                      # locale for system error message
lc_monetary = 'en_US.utf8'                      # locale for monetary formatting
lc_numeric = 'en_US.utf8'                       # locale for number formatting
lc_time = 'en_US.utf8'                          # locale for time formatting
default_text_search_config = 'pg_catalog.english'

log_timezone = 'Europe/Moscow'
log_connections = on
log_duration = off
log_hostname = on
log_min_messages = 'WARNING'
log_line_prefix = '%m [%p] %u@%d '

logging_collector = on
log_directory = 'logs'
log_filename = 'postgresql.log'
log_file_mode = 0644
log_truncate_on_rotation = on
log_rotation_age = 1d
log_destination = 'stderr'

#log_min_error_statement = debug1       # values in order of decreasing detail:
log_min_duration_statement = 500        # -1 is disabled, 0 logs all statements
log_min_duration_sample = 500           # -1 is disabled, 0 logs a sample of statements
К началу