#
# file is under control of puppet
# any update here will be reverted
#

# -----------------------------
# PostgreSQL configuration file
# -----------------------------

data_directory = '/pgdata/at_run/db'         
hba_file = '/etc/postgresql/9.4/at_run/pg_hba.conf'
ident_file = '/pgdata/at_run/db/pg_ident.conf'
external_pid_file = '/pgcontrol/var/postgres.pid'

listen_addresses = '*' 
port = 5432
max_connections = 2000
unix_socket_directories = '/pgcontrol/var'

shared_buffers = 1GB
work_mem = 512MB
maintenance_work_mem = 512MB

temp_file_limit = 2097152

wal_level = hot_standby

checkpoint_segments = 3

archive_mode = on
archive_command = 'true'
archive_timeout = 300

max_wal_senders = 3
wal_keep_segments = 30

hot_standby = on
hot_standby_feedback = on

effective_cache_size = 128MB

log_destination = 'stderr'
logging_collector = on
log_directory = '/pgcontrol/log'
syslog_facility = 'LOCAL3'
syslog_ident = 'postgres'
log_min_duration_statement = -1         # -1 is disabled
autovacuum_max_workers =         3
log_checkpoints = off
log_connections = on
log_disconnections = on
log_line_prefix = '%m %u@%d (%h/%p) '
log_timezone = 'Europe/Vienna'
track_counts = on
autovacuum = on                         # Enable autovacuum subprocess?  'on'
log_autovacuum_min_duration = 0         # 0 logs all actions
datestyle = 'iso, mdy'
timezone = 'Europe/Vienna'
lc_messages = 'en_US.UTF-8' 
lc_monetary = 'en_US.UTF-8' 
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
