harshancx

postgresql.conf

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