Advertisement
Guest User

Untitled

a guest
Jun 12th, 2018
163
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -----------------------------
  2. # PostgreSQL configuration file
  3. # -----------------------------
  4. #
  5. # This file consists of lines of the form:
  6. #
  7. # name = value
  8. #
  9. # (The "=" is optional.) Whitespace may be used. Comments are introduced with
  10. # "#" anywhere on a line. The complete list of parameter names and allowed
  11. # values can be found in the PostgreSQL documentation.
  12. #
  13. # The commented-out settings shown in this file represent the default values.
  14. # Re-commenting a setting is NOT sufficient to revert it to the default value;
  15. # you need to reload the server.
  16. #
  17. # This file is read on server startup and when the server receives a SIGHUP
  18. # signal. If you edit the file on a running system, you have to SIGHUP the
  19. # server for the changes to take effect, or use "pg_ctl reload". Some
  20. # parameters, which are marked below, require a server shutdown and restart to
  21. # take effect.
  22. #
  23. # Any parameter can also be given as a command-line option to the server, e.g.,
  24. # "postgres -c log_connections=on". Some parameters can be changed at run time
  25. # with the "SET" SQL command.
  26. #
  27. # Memory units: kB = kilobytes Time units: ms = milliseconds
  28. # MB = megabytes s = seconds
  29. # GB = gigabytes min = minutes
  30. # TB = terabytes h = hours
  31. # d = days
  32.  
  33.  
  34. #------------------------------------------------------------------------------
  35. # FILE LOCATIONS
  36. #------------------------------------------------------------------------------
  37.  
  38. # The default values of these variables are driven from the -D command-line
  39. # option or PGDATA environment variable, represented here as ConfigDir.
  40.  
  41. data_directory = '/var/lib/postgresql/9.5/main' # use data in another directory
  42. # (change requires restart)
  43. hba_file = '/etc/postgresql/9.5/main/pg_hba.conf' # host-based authentication file
  44. # (change requires restart)
  45. ident_file = '/etc/postgresql/9.5/main/pg_ident.conf' # ident configuration file
  46. # (change requires restart)
  47.  
  48. # If external_pid_file is not explicitly set, no extra PID file is written.
  49. external_pid_file = '/var/run/postgresql/9.5-main.pid' # write an extra PID file
  50. # (change requires restart)
  51.  
  52.  
  53. #------------------------------------------------------------------------------
  54. # CONNECTIONS AND AUTHENTICATION
  55. #------------------------------------------------------------------------------
  56.  
  57. # - Connection Settings -
  58.  
  59. #listen_addresses = 'localhost' # what IP address(es) to listen on;
  60. # comma-separated list of addresses;
  61. # defaults to 'localhost'; use '*' for all
  62. # (change requires restart)
  63. port = 5432 # (change requires restart)
  64. max_connections = 800 # (change requires restart)
  65. #superuser_reserved_connections = 3 # (change requires restart)
  66. unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
  67. # (change requires restart)
  68. #unix_socket_group = '' # (change requires restart)
  69. #unix_socket_permissions = 0777 # begin with 0 to use octal notation
  70. # (change requires restart)
  71. #bonjour = off # advertise server via Bonjour
  72. # (change requires restart)
  73. #bonjour_name = '' # defaults to the computer name
  74. # (change requires restart)
  75.  
  76. # - Security and Authentication -
  77.  
  78. #authentication_timeout = 1min # 1s-600s
  79. ssl = true # (change requires restart)
  80. #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
  81. # (change requires restart)
  82. #ssl_prefer_server_ciphers = on # (change requires restart)
  83. #ssl_ecdh_curve = 'prime256v1' # (change requires restart)
  84. ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
  85. ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
  86. #ssl_ca_file = '' # (change requires restart)
  87. #ssl_crl_file = '' # (change requires restart)
  88. #password_encryption = on
  89. #db_user_namespace = off
  90. #row_security = on
  91.  
  92. # GSSAPI using Kerberos
  93. #krb_server_keyfile = ''
  94. #krb_caseins_users = off
  95.  
  96. # - TCP Keepalives -
  97. # see "man 7 tcp" for details
  98.  
  99. #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
  100. # 0 selects the system default
  101. #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
  102. # 0 selects the system default
  103. #tcp_keepalives_count = 0 # TCP_KEEPCNT;
  104. # 0 selects the system default
  105.  
  106.  
  107. #------------------------------------------------------------------------------
  108. # RESOURCE USAGE (except WAL)
  109. #------------------------------------------------------------------------------
  110.  
  111. # - Memory -
  112.  
  113. shared_buffers = 6GB # min 128kB
  114. # (change requires restart)
  115. #huge_pages = try # on, off, or try
  116. # (change requires restart)
  117. #temp_buffers = 8MB # min 800kB
  118. #max_prepared_transactions = 0 # zero disables the feature
  119. # (change requires restart)
  120. # Caution: it is not advisable to set max_prepared_transactions nonzero unless
  121. # you actively intend to use prepared transactions.
  122. work_mem = 1500MB # min 64kB
  123. maintenance_work_mem = 10GB # min 1MB
  124. #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
  125. #max_stack_depth = 2MB # min 100kB
  126. dynamic_shared_memory_type = posix # the default is the first option
  127. # supported by the operating system:
  128. # posix
  129. # sysv
  130. # windows
  131. # mmap
  132. # use none to disable dynamic shared memory
  133. # (change requires restart)
  134.  
  135. # - Disk -
  136.  
  137. #temp_file_limit = -1 # limits per-session temp file space
  138. # in kB, or -1 for no limit
  139.  
  140. # - Kernel Resource Usage -
  141.  
  142. #max_files_per_process = 1000 # min 25
  143. # (change requires restart)
  144. #shared_preload_libraries = '' # (change requires restart)
  145.  
  146. # - Cost-Based Vacuum Delay -
  147.  
  148. #vacuum_cost_delay = 0 # 0-100 milliseconds
  149. #vacuum_cost_page_hit = 1 # 0-10000 credits
  150. #vacuum_cost_page_miss = 10 # 0-10000 credits
  151. #vacuum_cost_page_dirty = 20 # 0-10000 credits
  152. #vacuum_cost_limit = 200 # 1-10000 credits
  153.  
  154. # - Background Writer -
  155.  
  156. #bgwriter_delay = 200ms # 10-10000ms between rounds
  157. #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
  158. #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
  159.  
  160. # - Asynchronous Behavior -
  161.  
  162. effective_io_concurrency = 30 # 1-1000; 0 disables prefetching
  163. #max_worker_processes = 8
  164.  
  165.  
  166. #------------------------------------------------------------------------------
  167. # WRITE AHEAD LOG
  168. #------------------------------------------------------------------------------
  169.  
  170. # - Settings -
  171.  
  172. #wal_level = minimal # minimal, archive, hot_standby, or logical
  173. # (change requires restart)
  174. fsync = off # turns forced synchronization on or off
  175. synchronous_commit = off # synchronization level;
  176. # off, local, remote_write, or on
  177. #wal_sync_method = fsync # the default is the first option
  178. # supported by the operating system:
  179. # open_datasync
  180. # fdatasync (default on Linux)
  181. # fsync
  182. # fsync_writethrough
  183. # open_sync
  184. full_page_writes = off # recover from partial page writes
  185. #wal_compression = off # enable compression of full-page writes
  186. #wal_log_hints = off # also do full page writes of non-critical updates
  187. # (change requires restart)
  188. #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
  189. # (change requires restart)
  190. #wal_writer_delay = 200ms # 1-10000 milliseconds
  191.  
  192. #commit_delay = 0 # range 0-100000, in microseconds
  193. #commit_siblings = 5 # range 1-1000
  194.  
  195. # - Checkpoints -
  196.  
  197. checkpoint_timeout = 10min # range 30s-1h
  198. max_wal_size = 5GB
  199. #min_wal_size = 80MB
  200. checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0
  201. #checkpoint_warning = 30s # 0 disables
  202.  
  203. # - Archiving -
  204.  
  205. #archive_mode = off # enables archiving; off, on, or always
  206. # (change requires restart)
  207. #archive_command = '' # command to use to archive a logfile segment
  208. # placeholders: %p = path of file to archive
  209. # %f = file name only
  210. # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
  211. #archive_timeout = 0 # force a logfile segment switch after this
  212. # number of seconds; 0 disables
  213.  
  214.  
  215. #------------------------------------------------------------------------------
  216. # REPLICATION
  217. #------------------------------------------------------------------------------
  218.  
  219. # - Sending Server(s) -
  220.  
  221. # Set these on the master and on any standby that will send replication data.
  222.  
  223. #max_wal_senders = 0 # max number of walsender processes
  224. # (change requires restart)
  225. #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
  226. #wal_sender_timeout = 60s # in milliseconds; 0 disables
  227.  
  228. #max_replication_slots = 0 # max number of replication slots
  229. # (change requires restart)
  230. #track_commit_timestamp = off # collect timestamp of transaction commit
  231. # (change requires restart)
  232.  
  233. # - Master Server -
  234.  
  235. # These settings are ignored on a standby server.
  236.  
  237. #synchronous_standby_names = '' # standby servers that provide sync rep
  238. # comma-separated list of application_name
  239. # from standby(s); '*' = all
  240. #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
  241.  
  242. # - Standby Servers -
  243.  
  244. # These settings are ignored on a master server.
  245.  
  246. #hot_standby = off # "on" allows queries during recovery
  247. # (change requires restart)
  248. #max_standby_archive_delay = 30s # max delay before canceling queries
  249. # when reading WAL from archive;
  250. # -1 allows indefinite delay
  251. #max_standby_streaming_delay = 30s # max delay before canceling queries
  252. # when reading streaming WAL;
  253. # -1 allows indefinite delay
  254. #wal_receiver_status_interval = 10s # send replies at least this often
  255. # 0 disables
  256. #hot_standby_feedback = off # send info from standby to prevent
  257. # query conflicts
  258. #wal_receiver_timeout = 60s # time that receiver waits for
  259. # communication from master
  260. # in milliseconds; 0 disables
  261. #wal_retrieve_retry_interval = 5s # time to wait before retrying to
  262. # retrieve WAL after a failed attempt
  263.  
  264.  
  265. #------------------------------------------------------------------------------
  266. # QUERY TUNING
  267. #------------------------------------------------------------------------------
  268.  
  269. # - Planner Method Configuration -
  270.  
  271. #enable_bitmapscan = on
  272. #enable_hashagg = on
  273. #enable_hashjoin = on
  274. #enable_indexscan = on
  275. #enable_indexonlyscan = on
  276. #enable_material = on
  277. #enable_mergejoin = on
  278. #enable_nestloop = on
  279. #enable_seqscan = on
  280. #enable_sort = on
  281. #enable_tidscan = on
  282.  
  283. # - Planner Cost Constants -
  284.  
  285. #seq_page_cost = 1.0 # measured on an arbitrary scale
  286. random_page_cost = 1.1 # same scale as above
  287. #cpu_tuple_cost = 0.01 # same scale as above
  288. #cpu_index_tuple_cost = 0.005 # same scale as above
  289. #cpu_operator_cost = 0.0025 # same scale as above
  290. effective_cache_size = 24GB
  291.  
  292. # - Genetic Query Optimizer -
  293.  
  294. #geqo = on
  295. #geqo_threshold = 12
  296. #geqo_effort = 5 # range 1-10
  297. #geqo_pool_size = 0 # selects default based on effort
  298. #geqo_generations = 0 # selects default based on effort
  299. #geqo_selection_bias = 2.0 # range 1.5-2.0
  300. #geqo_seed = 0.0 # range 0.0-1.0
  301.  
  302. # - Other Planner Options -
  303.  
  304. #default_statistics_target = 100 # range 1-10000
  305. #constraint_exclusion = partition # on, off, or partition
  306. #cursor_tuple_fraction = 0.1 # range 0.0-1.0
  307. #from_collapse_limit = 8
  308. #join_collapse_limit = 8 # 1 disables collapsing of explicit
  309. # JOIN clauses
  310.  
  311.  
  312. #------------------------------------------------------------------------------
  313. # ERROR REPORTING AND LOGGING
  314. #------------------------------------------------------------------------------
  315.  
  316. # - Where to Log -
  317.  
  318. #log_destination = 'stderr' # Valid values are combinations of
  319. # stderr, csvlog, syslog, and eventlog,
  320. # depending on platform. csvlog
  321. # requires logging_collector to be on.
  322.  
  323. # This is used when logging to stderr:
  324. #logging_collector = off # Enable capturing of stderr and csvlog
  325. # into log files. Required to be on for
  326. # csvlogs.
  327. # (change requires restart)
  328.  
  329. # These are only used if logging_collector is on:
  330. #log_directory = 'pg_log' # directory where log files are written,
  331. # can be absolute or relative to PGDATA
  332. #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
  333. # can include strftime() escapes
  334. #log_file_mode = 0600 # creation mode for log files,
  335. # begin with 0 to use octal notation
  336. #log_truncate_on_rotation = off # If on, an existing log file with the
  337. # same name as the new log file will be
  338. # truncated rather than appended to.
  339. # But such truncation only occurs on
  340. # time-driven rotation, not on restarts
  341. # or size-driven rotation. Default is
  342. # off, meaning append to existing files
  343. # in all cases.
  344. #log_rotation_age = 1d # Automatic rotation of logfiles will
  345. # happen after that time. 0 disables.
  346. #log_rotation_size = 10MB # Automatic rotation of logfiles will
  347. # happen after that much log output.
  348. # 0 disables.
  349.  
  350. # These are relevant when logging to syslog:
  351. #syslog_facility = 'LOCAL0'
  352. #syslog_ident = 'postgres'
  353.  
  354. # This is only relevant when logging to eventlog (win32):
  355. # (change requires restart)
  356. #event_source = 'PostgreSQL'
  357.  
  358. # - When to Log -
  359.  
  360. #client_min_messages = notice # values in order of decreasing detail:
  361. # debug5
  362. # debug4
  363. # debug3
  364. # debug2
  365. # debug1
  366. # log
  367. # notice
  368. # warning
  369. # error
  370.  
  371. #log_min_messages = warning # values in order of decreasing detail:
  372. # debug5
  373. # debug4
  374. # debug3
  375. # debug2
  376. # debug1
  377. # info
  378. # notice
  379. # warning
  380. # error
  381. # log
  382. # fatal
  383. # panic
  384.  
  385. #log_min_error_statement = error # values in order of decreasing detail:
  386. # debug5
  387. # debug4
  388. # debug3
  389. # debug2
  390. # debug1
  391. # info
  392. # notice
  393. # warning
  394. # error
  395. # log
  396. # fatal
  397. # panic (effectively off)
  398.  
  399. #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
  400. # and their durations, > 0 logs only
  401. # statements running at least this number
  402. # of milliseconds
  403.  
  404.  
  405. # - What to Log -
  406.  
  407. #debug_print_parse = off
  408. #debug_print_rewritten = off
  409. #debug_print_plan = off
  410. #debug_pretty_print = on
  411. #log_checkpoints = off
  412. #log_connections = off
  413. #log_disconnections = off
  414. #log_duration = off
  415. #log_error_verbosity = default # terse, default, or verbose messages
  416. #log_hostname = off
  417. log_line_prefix = '%t [%p-%l] %q%u@%d ' # special values:
  418. # %a = application name
  419. # %u = user name
  420. # %d = database name
  421. # %r = remote host and port
  422. # %h = remote host
  423. # %p = process ID
  424. # %t = timestamp without milliseconds
  425. # %m = timestamp with milliseconds
  426. # %i = command tag
  427. # %e = SQL state
  428. # %c = session ID
  429. # %l = session line number
  430. # %s = session start timestamp
  431. # %v = virtual transaction ID
  432. # %x = transaction ID (0 if none)
  433. # %q = stop here in non-session
  434. # processes
  435. # %% = '%'
  436. # e.g. '<%u%%%d> '
  437. #log_lock_waits = off # log lock waits >= deadlock_timeout
  438. #log_statement = 'none' # none, ddl, mod, all
  439. #log_replication_commands = off
  440. #log_temp_files = -1 # log temporary files equal or larger
  441. # than the specified size in kilobytes;
  442. # -1 disables, 0 logs all temp files
  443. log_timezone = 'UTC'
  444.  
  445.  
  446. # - Process Title -
  447.  
  448. #cluster_name = '' # added to process titles if nonempty
  449. # (change requires restart)
  450. #update_process_title = on
  451.  
  452.  
  453. #------------------------------------------------------------------------------
  454. # RUNTIME STATISTICS
  455. #------------------------------------------------------------------------------
  456.  
  457. # - Query/Index Statistics Collector -
  458.  
  459. #track_activities = on
  460. #track_counts = on
  461. #track_io_timing = off
  462. #track_functions = none # none, pl, all
  463. #track_activity_query_size = 1024 # (change requires restart)
  464. stats_temp_directory = '/var/run/postgresql/9.5-main.pg_stat_tmp'
  465.  
  466.  
  467. # - Statistics Monitoring -
  468.  
  469. #log_parser_stats = off
  470. #log_planner_stats = off
  471. #log_executor_stats = off
  472. #log_statement_stats = off
  473.  
  474.  
  475. #------------------------------------------------------------------------------
  476. # AUTOVACUUM PARAMETERS
  477. #------------------------------------------------------------------------------
  478.  
  479. autovacuum = off # Enable autovacuum subprocess? 'on'
  480. # requires track_counts to also be on.
  481. #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
  482. # their durations, > 0 logs only
  483. # actions running at least this number
  484. # of milliseconds.
  485. #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
  486. # (change requires restart)
  487. #autovacuum_naptime = 1min # time between autovacuum runs
  488. #autovacuum_vacuum_threshold = 50 # min number of row updates before
  489. # vacuum
  490. #autovacuum_analyze_threshold = 50 # min number of row updates before
  491. # analyze
  492. #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
  493. #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
  494. #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
  495. # (change requires restart)
  496. #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
  497. # before forced vacuum
  498. # (change requires restart)
  499. #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
  500. # autovacuum, in milliseconds;
  501. # -1 means use vacuum_cost_delay
  502. #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
  503. # autovacuum, -1 means use
  504. # vacuum_cost_limit
  505.  
  506.  
  507. #------------------------------------------------------------------------------
  508. # CLIENT CONNECTION DEFAULTS
  509. #------------------------------------------------------------------------------
  510.  
  511. # - Statement Behavior -
  512.  
  513. #search_path = '"$user", public' # schema names
  514. #default_tablespace = '' # a tablespace name, '' uses the default
  515. #temp_tablespaces = '' # a list of tablespace names, '' uses
  516. # only default tablespace
  517. #check_function_bodies = on
  518. #default_transaction_isolation = 'read committed'
  519. #default_transaction_read_only = off
  520. #default_transaction_deferrable = off
  521. #session_replication_role = 'origin'
  522. #statement_timeout = 0 # in milliseconds, 0 is disabled
  523. #lock_timeout = 0 # in milliseconds, 0 is disabled
  524. #vacuum_freeze_min_age = 50000000
  525. #vacuum_freeze_table_age = 150000000
  526. #vacuum_multixact_freeze_min_age = 5000000
  527. #vacuum_multixact_freeze_table_age = 150000000
  528. #bytea_output = 'hex' # hex, escape
  529. #xmlbinary = 'base64'
  530. #xmloption = 'content'
  531. #gin_fuzzy_search_limit = 0
  532. #gin_pending_list_limit = 4MB
  533.  
  534. # - Locale and Formatting -
  535.  
  536. datestyle = 'iso, mdy'
  537. #intervalstyle = 'postgres'
  538. timezone = 'UTC'
  539. #timezone_abbreviations = 'Default' # Select the set of available time zone
  540. # abbreviations. Currently, there are
  541. # Default
  542. # Australia (historical usage)
  543. # India
  544. # You can create your own file in
  545. # share/timezonesets/.
  546. #extra_float_digits = 0 # min -15, max 3
  547. #client_encoding = sql_ascii # actually, defaults to database
  548. # encoding
  549.  
  550. # These settings are initialized by initdb, but they can be changed.
  551. lc_messages = 'C' # locale for system error message
  552. # strings
  553. lc_monetary = 'C' # locale for monetary formatting
  554. lc_numeric = 'C' # locale for number formatting
  555. lc_time = 'C' # locale for time formatting
  556.  
  557. # default configuration for text search
  558. default_text_search_config = 'pg_catalog.english'
  559.  
  560. # - Other Defaults -
  561.  
  562. #dynamic_library_path = '$libdir'
  563. #local_preload_libraries = ''
  564. #session_preload_libraries = ''
  565.  
  566.  
  567. #------------------------------------------------------------------------------
  568. # LOCK MANAGEMENT
  569. #------------------------------------------------------------------------------
  570.  
  571. #deadlock_timeout = 1s
  572. #max_locks_per_transaction = 64 # min 10
  573. # (change requires restart)
  574. #max_pred_locks_per_transaction = 64 # min 10
  575. # (change requires restart)
  576.  
  577.  
  578. #------------------------------------------------------------------------------
  579. # VERSION/PLATFORM COMPATIBILITY
  580. #------------------------------------------------------------------------------
  581.  
  582. # - Previous PostgreSQL Versions -
  583.  
  584. #array_nulls = on
  585. #backslash_quote = safe_encoding # on, off, or safe_encoding
  586. #default_with_oids = off
  587. #escape_string_warning = on
  588. #lo_compat_privileges = off
  589. #operator_precedence_warning = off
  590. #quote_all_identifiers = off
  591. #sql_inheritance = on
  592. #standard_conforming_strings = on
  593. #synchronize_seqscans = on
  594.  
  595. # - Other Platforms and Clients -
  596.  
  597. #transform_null_equals = off
  598.  
  599.  
  600. #------------------------------------------------------------------------------
  601. # ERROR HANDLING
  602. #------------------------------------------------------------------------------
  603.  
  604. #exit_on_error = off # terminate session on any error?
  605. #restart_after_crash = on # reinitialize after backend crash?
  606.  
  607.  
  608. #------------------------------------------------------------------------------
  609. # CONFIG FILE INCLUDES
  610. #------------------------------------------------------------------------------
  611.  
  612. # These options allow settings to be loaded from files other than the
  613. # default postgresql.conf.
  614.  
  615. #include_dir = 'conf.d' # include files ending in '.conf' from
  616. # directory 'conf.d'
  617. #include_if_exists = 'exists.conf' # include file only if it exists
  618. #include = 'special.conf' # include file
  619.  
  620.  
  621. #------------------------------------------------------------------------------
  622. # CUSTOMIZED OPTIONS
  623. #------------------------------------------------------------------------------
  624.  
  625. # Add settings for extensions here
Advertisement
RAW Paste Data Copied
Advertisement