host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
-#local replication postgres trust
-#host replication postgres 127.0.0.1/32 trust
-#host replication postgres ::1/128 trust
+local replication postgres trust
+host replication postgres 127.0.0.1/32 trust
+host replication postgres ::1/128 trust
#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = '' # (change requires restart)
+shared_preload_libraries = 'auto_explain'
+auto_explain.log_min_duration = 1000ms
+auto_explain.log_verbose = on
+auto_explain.log_nested_statements = on
# - Cost-Based Vacuum Delay -
#wal_level = minimal # minimal, archive, hot_standby, or logical
# (change requires restart)
+wal_level = archive
#fsync = on # turns forced synchronization on or off
#synchronous_commit = on # synchronization level;
# off, local, remote_write, or on
#archive_mode = off # enables archiving; off, on, or always
# (change requires restart)
+archive_mode = on
#archive_command = '' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
# %f = file name only
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
+archive_command = 'test ! -f /var/backup/pgsql/log/%f.gz && gzip -c %p >/var/backup/pgsql/log/%f.gz'
#archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables
#max_wal_senders = 0 # max number of walsender processes
# (change requires restart)
+max_wal_senders = 2
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
#wal_sender_timeout = 60s # in milliseconds; 0 disables