listen_addresses = '*'          # what IP address(es) to listen on;
max_connections = 500           # (change requires restart)
shared_buffers = 6GB            # min 128kB
work_mem = 256MB                # min 64kB
maintenance_work_mem = 1GB      # min 1MB

shared_preload_libraries = 'pg_stat_statements'        # (change requires restart)

pg_stat_statements.max = 10000  # Will track up to 10,000 statements
pg_stat_statements.track = all  # Will track sub-queries as well
effective_io_concurrency = 10   # 1-1000. 0 disables prefetching
wal_level = hot_standby         # minimal, archive, or hot_standby
wal_buffers = 4MB               # min 32kB

checkpoint_segments = 256             # in logfile segments, min 1, 16MB each
checkpoint_timeout = 30min            # range 30s-1h
checkpoint_completion_target = 0.9    # checkpoint target duration, 0.0 - 1.0

archive_mode = on               # allows archiving to be done
archive_command = 'rsync -a %p 172.17.10.10:/backups/pg_archives/%f'

max_wal_senders = 10            # max number of walsender processes
wal_keep_segments = 1536        # in logfile segments, 16MB each; 0 disables
random_page_cost = 2.0          # same scale as above
effective_cache_size = 176GB
log_destination = 'stderr'      # Valid values are combinations of
logging_collector = on          # Enable capturing of stderr and csvlog

log_directory = '/var/log/postgres'             # directory where log files are written,
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,  

log_truncate_on_rotation = on    # If on, an existing log file of the
log_rotation_age = 1d            # Automatic rotation of logfiles will
log_rotation_size = 0            # Automatic rotation of logfiles will 
log_min_duration_statement = 500 # -1 is disabled, 0 logs all statements
log_checkpoints = on
log_line_prefix = '%t [%p]: [%l-1] '
log_lock_waits = on             # log lock waits >= deadlock_timeout
log_temp_files = 0              # log temporary files equal or larger
track_activities = on
track_counts = on
autovacuum = on                 # Enable autovacuum subprocess?  'on' 
log_autovacuum_min_duration = 0 # -1 disables, 0 logs all actions and
autovacuum_max_workers = 6      # max number of autovacuum subprocesses

autovacuum_freeze_max_age = 1000000000    # maximum XID age before forced vacuum
vacuum_freeze_min_age = 10000
vacuum_freeze_table_age = 500000000

datestyle = 'iso, mdy'
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'

