From 4a1b3b1f837bc46355d7ed7bb5dc54546d44cdb3 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 5 Jan 2017 03:10:02 +0100 Subject: [PATCH] daily autocommit --- postgresql-9.5/pg_hba.conf | 6 +++--- postgresql-9.5/postgresql.conf | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/postgresql-9.5/pg_hba.conf b/postgresql-9.5/pg_hba.conf index 7bef7cf..afb99da 100644 --- a/postgresql-9.5/pg_hba.conf +++ b/postgresql-9.5/pg_hba.conf @@ -97,6 +97,6 @@ host all all 192.168.122.1/32 trust 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 diff --git a/postgresql-9.5/postgresql.conf b/postgresql-9.5/postgresql.conf index 6b7e3d8..57026bd 100644 --- a/postgresql-9.5/postgresql.conf +++ b/postgresql-9.5/postgresql.conf @@ -143,6 +143,10 @@ dynamic_shared_memory_type = posix # the default is the first option #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 - @@ -172,6 +176,7 @@ dynamic_shared_memory_type = posix # the default is the first option #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 @@ -205,10 +210,12 @@ dynamic_shared_memory_type = posix # the default is the first option #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 @@ -223,6 +230,7 @@ dynamic_shared_memory_type = posix # the default is the first option #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 -- 2.39.5