|
@@ -1,144 +1,35 @@
|
|
# For a full conf file see:
|
|
# For a full conf file see:
|
|
# https://github.com/TechEmpower/FrameworkBenchmarks/blob/d8f043d183d1ccbba41157bd57314ef61059edb8/toolset/databases/postgres/postgresql.conf.sample
|
|
# https://github.com/TechEmpower/FrameworkBenchmarks/blob/d8f043d183d1ccbba41157bd57314ef61059edb8/toolset/databases/postgres/postgresql.conf.sample
|
|
|
|
|
|
-listen_addresses = '*' # what IP address(es) to listen on;
|
|
|
|
-max_connections = 2000 # (change requires restart)
|
|
|
|
|
|
+listen_addresses = '*'
|
|
|
|
+max_connections = 2000
|
|
|
|
+ssl = false
|
|
|
|
|
|
-ssl = false # (change requires restart)
|
|
|
|
-
|
|
|
|
-# - Memory -
|
|
|
|
# values from: http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-pgbench
|
|
# values from: http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-pgbench
|
|
# details: http://www.postgresql.org/docs/9.4/static/runtime-config-resource.html
|
|
# details: http://www.postgresql.org/docs/9.4/static/runtime-config-resource.html
|
|
# http://www.postgresql.org/docs/9.4/static/runtime-config-wal.html
|
|
# http://www.postgresql.org/docs/9.4/static/runtime-config-wal.html
|
|
# http://www.postgresql.org/docs/9.4/static/runtime-config-query.html
|
|
# http://www.postgresql.org/docs/9.4/static/runtime-config-query.html
|
|
-shared_buffers = 256MB # min 128kB
|
|
|
|
-work_mem = 64MB # min 64kB
|
|
|
|
-maintenance_work_mem = 512MB # min 1MB
|
|
|
|
-# checkpoint_segments = 64
|
|
|
|
-checkpoint_completion_target = 0.9
|
|
|
|
-effective_cache_size = 8GB
|
|
|
|
-
|
|
|
|
-# when executed on the SSD (otherwise 4)
|
|
|
|
-random_page_cost = 2
|
|
|
|
-
|
|
|
|
-shared_preload_libraries = 'pg_stat_statements' # (change requires restart)
|
|
|
|
-pg_stat_statements.track = all
|
|
|
|
-pg_stat_statements.max = 500000
|
|
|
|
-track_activity_query_size = 2048
|
|
|
|
-
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-# WRITE AHEAD LOG
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-
|
|
|
|
-# - Settings -
|
|
|
|
|
|
|
|
-wal_level = minimal # minimal, archive, or hot_standby
|
|
|
|
|
|
+shared_buffers = 256MB
|
|
|
|
+work_mem = 64MB
|
|
|
|
+maintenance_work_mem = 512MB
|
|
|
|
+wal_level = minimal
|
|
|
|
|
|
# WARNING: disabling synchronous commit may be dangerous in certain cases.
|
|
# WARNING: disabling synchronous commit may be dangerous in certain cases.
|
|
# See http://www.postgresql.org/docs/current/static/runtime-config-wal.html
|
|
# See http://www.postgresql.org/docs/current/static/runtime-config-wal.html
|
|
# for details.
|
|
# for details.
|
|
synchronous_commit = off
|
|
synchronous_commit = off
|
|
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-# REPLICATION
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-
|
|
|
|
-# - Master Server -
|
|
|
|
-
|
|
|
|
-# These settings are ignored on a standby server
|
|
|
|
-
|
|
|
|
-max_wal_senders = 0 # max number of walsender processes
|
|
|
|
- # (change requires restart)
|
|
|
|
-
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-# ERROR REPORTING AND LOGGING
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-
|
|
|
|
-log_line_prefix = '%t ' # special values:
|
|
|
|
- # %a = application name
|
|
|
|
- # %u = user name
|
|
|
|
- # %d = database name
|
|
|
|
- # %r = remote host and port
|
|
|
|
- # %h = remote host
|
|
|
|
- # %p = process ID
|
|
|
|
- # %t = timestamp without milliseconds
|
|
|
|
- # %m = timestamp with milliseconds
|
|
|
|
- # %i = command tag
|
|
|
|
- # %e = SQL state
|
|
|
|
- # %c = session ID
|
|
|
|
- # %l = session line number
|
|
|
|
- # %s = session start timestamp
|
|
|
|
- # %v = virtual transaction ID
|
|
|
|
- # %x = transaction ID (0 if none)
|
|
|
|
- # %q = stop here in non-session
|
|
|
|
- # processes
|
|
|
|
- # %% = '%'
|
|
|
|
- # e.g. '<%u%%%d> '
|
|
|
|
-
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-# CLIENT CONNECTION DEFAULTS
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-
|
|
|
|
-# - Statement Behavior -
|
|
|
|
-
|
|
|
|
-#search_path = '"$user",public' # schema names
|
|
|
|
-#default_tablespace = '' # a tablespace name, '' uses the default
|
|
|
|
-#temp_tablespaces = '' # a list of tablespace names, '' uses
|
|
|
|
- # only default tablespace
|
|
|
|
-#check_function_bodies = on
|
|
|
|
-#default_transaction_isolation = 'read committed'
|
|
|
|
-#default_transaction_read_only = off
|
|
|
|
-#default_transaction_deferrable = off
|
|
|
|
-#session_replication_role = 'origin'
|
|
|
|
-#statement_timeout = 0 # in milliseconds, 0 is disabled
|
|
|
|
-#vacuum_freeze_min_age = 50000000
|
|
|
|
-#vacuum_freeze_table_age = 150000000
|
|
|
|
-#bytea_output = 'hex' # hex, escape
|
|
|
|
-#xmlbinary = 'base64'
|
|
|
|
-#xmloption = 'content'
|
|
|
|
-
|
|
|
|
-# - Locale and Formatting -
|
|
|
|
-
|
|
|
|
-#datestyle = 'iso, mdy'
|
|
|
|
-#intervalstyle = 'postgres'
|
|
|
|
-#timezone = '(defaults to server environment setting)'
|
|
|
|
-#timezone_abbreviations = 'Default' # Select the set of available time zone
|
|
|
|
- # abbreviations. Currently, there are
|
|
|
|
- # Default
|
|
|
|
- # Australia
|
|
|
|
- # India
|
|
|
|
- # You can create your own file in
|
|
|
|
- # share/timezonesets/.
|
|
|
|
-#extra_float_digits = 0 # min -15, max 3
|
|
|
|
-#client_encoding = sql_ascii # actually, defaults to database
|
|
|
|
- # encoding
|
|
|
|
-
|
|
|
|
-# These settings are initialized by initdb, but they can be changed.
|
|
|
|
-#lc_messages = 'en_US.UTF-8' # locale for system error message
|
|
|
|
- # strings
|
|
|
|
-#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 configuration for text search
|
|
|
|
-#default_text_search_config = 'pg_catalog.english'
|
|
|
|
-
|
|
|
|
-# - Other Defaults -
|
|
|
|
-
|
|
|
|
-#dynamic_library_path = '$libdir'
|
|
|
|
-#local_preload_libraries = ''
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
-# LOCK MANAGEMENT
|
|
|
|
-#------------------------------------------------------------------------------
|
|
|
|
|
|
+checkpoint_completion_target = 0.9
|
|
|
|
+max_wal_senders = 0
|
|
|
|
|
|
-#deadlock_timeout = 1s
|
|
|
|
-#max_locks_per_transaction = 64 # min 10
|
|
|
|
- # (change requires restart)
|
|
|
|
-# Note: Each lock table slot uses ~270 bytes of shared memory, and there are
|
|
|
|
-# max_locks_per_transaction * (max_connections + max_prepared_transactions)
|
|
|
|
-# lock table slots.
|
|
|
|
-max_pred_locks_per_transaction = 256 # min 10
|
|
|
|
- # (change requires restart)
|
|
|
|
|
|
+# when executed on the SSD (otherwise 4)
|
|
|
|
+random_page_cost = 2
|
|
|
|
|
|
|
|
+effective_cache_size = 8GB
|
|
|
|
+log_line_prefix = '%t '
|
|
|
|
+track_activity_query_size = 2048
|
|
|
|
+shared_preload_libraries = 'pg_stat_statements'
|
|
|
|
+pg_stat_statements.track = all
|
|
|
|
+pg_stat_statements.max = 500000
|
|
|
|
+max_pred_locks_per_transaction = 256
|