123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- # See postgresql.conf.sample for a full conf file
- listen_addresses = '*' # what IP address(es) to listen on;
- max_connections = 2000 # (change requires restart)
- ssl = false # (change requires restart)
- # - Memory -
- # 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
- # http://www.postgresql.org/docs/9.4/static/runtime-config-wal.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
- # WARNING: disabling synchronous commit may be dangerous in certain cases.
- # See http://www.postgresql.org/docs/current/static/runtime-config-wal.html
- # for details.
- 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
- #------------------------------------------------------------------------------
- #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)
|