1 # -----------------------------
2 # PostgreSQL configuration file
3 # -----------------------------
5 # This file consists of lines of the form:
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.
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.
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
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.
27 # Memory units: kB = kilobytes Time units: ms = milliseconds
28 # MB = megabytes s = seconds
29 # GB = gigabytes min = minutes
30 # TB = terabytes h = hours
34 #------------------------------------------------------------------------------
36 #------------------------------------------------------------------------------
38 # The default values of these variables are driven from the -D command-line
39 # option or PGDATA environment variable, represented here as ConfigDir.
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)
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)
53 #------------------------------------------------------------------------------
54 # CONNECTIONS AND AUTHENTICATION
55 #------------------------------------------------------------------------------
57 # - Connection Settings -
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 = '/var/run/postgresql, /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)
76 # - Security and Authentication -
78 #authentication_timeout = 1min # 1s-600s
79 #ssl = off # (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 = 'server.crt' # (change requires restart)
85 #ssl_key_file = 'server.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
92 # GSSAPI using Kerberos
93 #krb_server_keyfile = ''
94 #krb_caseins_users = off
97 # see "man 7 tcp" for details
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
107 #------------------------------------------------------------------------------
108 # RESOURCE USAGE (except WAL)
109 #------------------------------------------------------------------------------
113 shared_buffers = 128MB # 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 = 4MB # min 64kB
123 #maintenance_work_mem = 64MB # min 1MB
124 #replacement_sort_tuples = 150000 # limits use of replacement selection sort
125 #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
126 #max_stack_depth = 2MB # min 100kB
127 dynamic_shared_memory_type = posix # the default is the first option
128 # supported by the operating system:
133 # use none to disable dynamic shared memory
134 # (change requires restart)
138 #temp_file_limit = -1 # limits per-process temp file space
139 # in kB, or -1 for no limit
141 # - Kernel Resource Usage -
143 #max_files_per_process = 1000 # min 25
144 # (change requires restart)
145 #shared_preload_libraries = '' # (change requires restart)
147 # - Cost-Based Vacuum Delay -
149 #vacuum_cost_delay = 0 # 0-100 milliseconds
150 #vacuum_cost_page_hit = 1 # 0-10000 credits
151 #vacuum_cost_page_miss = 10 # 0-10000 credits
152 #vacuum_cost_page_dirty = 20 # 0-10000 credits
153 #vacuum_cost_limit = 200 # 1-10000 credits
155 # - Background Writer -
157 #bgwriter_delay = 200ms # 10-10000ms between rounds
158 #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
159 #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
160 #bgwriter_flush_after = 512kB # measured in pages, 0 disables
162 # - Asynchronous Behavior -
164 #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
165 #max_worker_processes = 8 # (change requires restart)
166 #max_parallel_workers_per_gather = 0 # taken from max_worker_processes
167 #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
168 # (change requires restart)
169 #backend_flush_after = 0 # measured in pages, 0 disables
172 #------------------------------------------------------------------------------
174 #------------------------------------------------------------------------------
178 wal_level = replica # minimal, replica, or logical
179 # (change requires restart)
180 #fsync = on # flush data to disk for crash safety
181 # (turning this off can cause
182 # unrecoverable data corruption)
183 # https://www.postgresql.org/docs/9.6/static/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT
184 synchronous_commit = on # synchronization level;
185 # off, local, remote_write, remote_apply, or on
186 #wal_sync_method = fsync # the default is the first option
187 # supported by the operating system:
189 # fdatasync (default on Linux)
193 #full_page_writes = on # recover from partial page writes
194 #wal_compression = off # enable compression of full-page writes
195 #wal_log_hints = off # also do full page writes of non-critical updates
196 # (change requires restart)
197 #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
198 # (change requires restart)
199 #wal_writer_delay = 200ms # 1-10000 milliseconds
200 #wal_writer_flush_after = 1MB # measured in pages, 0 disables
202 #commit_delay = 0 # range 0-100000, in microseconds
203 #commit_siblings = 5 # range 1-1000
207 #checkpoint_timeout = 5min # range 30s-1d
210 #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
211 #checkpoint_flush_after = 256kB # measured in pages, 0 disables
212 #checkpoint_warning = 30s # 0 disables
216 archive_mode = on # enables archiving; off, on, or always
217 # (change requires restart)
218 #archive_command = '' # command to use to archive a logfile segment
219 # placeholders: %p = path of file to archive
220 # %f = file name only
221 # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
222 archive_command = 'cp -i "%p" /var/lib/pgsql/9.6/archive/"%f" </dev/null'
223 #archive_timeout = 0 # force a logfile segment switch after this
224 # number of seconds; 0 disables
227 #------------------------------------------------------------------------------
229 #------------------------------------------------------------------------------
231 # - Sending Server(s) -
233 # Set these on the master and on any standby that will send replication data.
235 max_wal_senders = 3 # max number of walsender processes
236 # (change requires restart)
237 #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
238 #wal_sender_timeout = 60s # in milliseconds; 0 disables
240 max_replication_slots = 3 # max number of replication slots
241 # (change requires restart)
242 #track_commit_timestamp = off # collect timestamp of transaction commit
243 # (change requires restart)
247 # These settings are ignored on a standby server.
249 #synchronous_standby_names = '' # standby servers that provide sync rep
250 # number of sync standbys and comma-separated list of application_name
251 # from standby(s); '*' = all
252 #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
254 # - Standby Servers -
256 # These settings are ignored on a master server.
258 #hot_standby = on # "on" allows queries during recovery
259 # (change requires restart)
260 #max_standby_archive_delay = 30s # max delay before canceling queries
261 # when reading WAL from archive;
262 # -1 allows indefinite delay
263 #max_standby_streaming_delay = 30s # max delay before canceling queries
264 # when reading streaming WAL;
265 # -1 allows indefinite delay
266 #wal_receiver_status_interval = 10s # send replies at least this often
268 #hot_standby_feedback = off # send info from standby to prevent
270 #wal_receiver_timeout = 60s # time that receiver waits for
271 # communication from master
272 # in milliseconds; 0 disables
273 #wal_retrieve_retry_interval = 5s # time to wait before retrying to
274 # retrieve WAL after a failed attempt
277 #------------------------------------------------------------------------------
279 #------------------------------------------------------------------------------
281 # - Planner Method Configuration -
283 #enable_bitmapscan = on
285 #enable_hashjoin = on
286 #enable_indexscan = on
287 #enable_indexonlyscan = on
288 #enable_material = on
289 #enable_mergejoin = on
290 #enable_nestloop = on
295 # - Planner Cost Constants -
297 #seq_page_cost = 1.0 # measured on an arbitrary scale
298 #random_page_cost = 4.0 # same scale as above
299 #cpu_tuple_cost = 0.01 # same scale as above
300 #cpu_index_tuple_cost = 0.005 # same scale as above
301 #cpu_operator_cost = 0.0025 # same scale as above
302 #parallel_tuple_cost = 0.1 # same scale as above
303 #parallel_setup_cost = 1000.0 # same scale as above
304 #min_parallel_relation_size = 8MB
305 #effective_cache_size = 4GB
307 # - Genetic Query Optimizer -
311 #geqo_effort = 5 # range 1-10
312 #geqo_pool_size = 0 # selects default based on effort
313 #geqo_generations = 0 # selects default based on effort
314 #geqo_selection_bias = 2.0 # range 1.5-2.0
315 #geqo_seed = 0.0 # range 0.0-1.0
317 # - Other Planner Options -
319 #default_statistics_target = 100 # range 1-10000
320 #constraint_exclusion = partition # on, off, or partition
321 #cursor_tuple_fraction = 0.1 # range 0.0-1.0
322 #from_collapse_limit = 8
323 #join_collapse_limit = 8 # 1 disables collapsing of explicit
325 #force_parallel_mode = off
328 #------------------------------------------------------------------------------
329 # ERROR REPORTING AND LOGGING
330 #------------------------------------------------------------------------------
334 log_destination = 'syslog' # Valid values are combinations of
335 # stderr, csvlog, syslog, and eventlog,
336 # depending on platform. csvlog
337 # requires logging_collector to be on.
339 # This is used when logging to stderr:
340 logging_collector = on # Enable capturing of stderr and csvlog
341 # into log files. Required to be on for
343 # (change requires restart)
345 # These are only used if logging_collector is on:
346 log_directory = 'pg_log' # directory where log files are written,
347 # can be absolute or relative to PGDATA
348 log_filename = 'postgresql-%a.log' # log file name pattern,
349 # can include strftime() escapes
350 #log_file_mode = 0600 # creation mode for log files,
351 # begin with 0 to use octal notation
352 log_truncate_on_rotation = on # If on, an existing log file with the
353 # same name as the new log file will be
354 # truncated rather than appended to.
355 # But such truncation only occurs on
356 # time-driven rotation, not on restarts
357 # or size-driven rotation. Default is
358 # off, meaning append to existing files
360 log_rotation_age = 1d # Automatic rotation of logfiles will
361 # happen after that time. 0 disables.
362 log_rotation_size = 0 # Automatic rotation of logfiles will
363 # happen after that much log output.
366 # These are relevant when logging to syslog:
367 #syslog_facility = 'LOCAL0'
368 #syslog_ident = 'postgres'
369 #syslog_sequence_numbers = on
370 #syslog_split_messages = on
372 # This is only relevant when logging to eventlog (win32):
373 # (change requires restart)
374 #event_source = 'PostgreSQL'
378 #client_min_messages = notice # values in order of decreasing detail:
389 #log_min_messages = warning # values in order of decreasing detail:
403 #log_min_error_statement = error # values in order of decreasing detail:
415 # panic (effectively off)
417 #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
418 # and their durations, > 0 logs only
419 # statements running at least this number
425 #debug_print_parse = off
426 #debug_print_rewritten = off
427 #debug_print_plan = off
428 #debug_pretty_print = on
429 #log_checkpoints = off
430 #log_connections = off
431 #log_disconnections = off
433 #log_error_verbosity = default # terse, default, or verbose messages
435 log_line_prefix = '< %m > ' # special values:
436 # %a = application name
439 # %r = remote host and port
442 # %t = timestamp without milliseconds
443 # %m = timestamp with milliseconds
444 # %n = timestamp with milliseconds (as a Unix epoch)
448 # %l = session line number
449 # %s = session start timestamp
450 # %v = virtual transaction ID
451 # %x = transaction ID (0 if none)
452 # %q = stop here in non-session
456 #log_lock_waits = off # log lock waits >= deadlock_timeout
457 #log_statement = 'none' # none, ddl, mod, all
458 #log_replication_commands = off
459 #log_temp_files = -1 # log temporary files equal or larger
460 # than the specified size in kilobytes;
461 # -1 disables, 0 logs all temp files
462 log_timezone = 'US/Eastern'
467 #cluster_name = '' # added to process titles if nonempty
468 # (change requires restart)
469 #update_process_title = on
472 #------------------------------------------------------------------------------
474 #------------------------------------------------------------------------------
476 # - Query/Index Statistics Collector -
478 #track_activities = on
480 #track_io_timing = off
481 #track_functions = none # none, pl, all
482 #track_activity_query_size = 1024 # (change requires restart)
483 #stats_temp_directory = 'pg_stat_tmp'
486 # - Statistics Monitoring -
488 #log_parser_stats = off
489 #log_planner_stats = off
490 #log_executor_stats = off
491 #log_statement_stats = off
494 #------------------------------------------------------------------------------
495 # AUTOVACUUM PARAMETERS
496 #------------------------------------------------------------------------------
498 #autovacuum = on # Enable autovacuum subprocess? 'on'
499 # requires track_counts to also be on.
500 #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
501 # their durations, > 0 logs only
502 # actions running at least this number
504 #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
505 # (change requires restart)
506 #autovacuum_naptime = 1min # time between autovacuum runs
507 #autovacuum_vacuum_threshold = 50 # min number of row updates before
509 #autovacuum_analyze_threshold = 50 # min number of row updates before
511 #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
512 #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
513 #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
514 # (change requires restart)
515 #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
516 # before forced vacuum
517 # (change requires restart)
518 #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
519 # autovacuum, in milliseconds;
520 # -1 means use vacuum_cost_delay
521 #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
522 # autovacuum, -1 means use
526 #------------------------------------------------------------------------------
527 # CLIENT CONNECTION DEFAULTS
528 #------------------------------------------------------------------------------
530 # - Statement Behavior -
532 #search_path = '"$user", public' # schema names
533 #default_tablespace = '' # a tablespace name, '' uses the default
534 #temp_tablespaces = '' # a list of tablespace names, '' uses
535 # only default tablespace
536 #check_function_bodies = on
537 #default_transaction_isolation = 'read committed'
538 #default_transaction_read_only = off
539 #default_transaction_deferrable = off
540 #session_replication_role = 'origin'
541 #statement_timeout = 0 # in milliseconds, 0 is disabled
542 #lock_timeout = 0 # in milliseconds, 0 is disabled
543 #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled
544 #vacuum_freeze_min_age = 50000000
545 #vacuum_freeze_table_age = 150000000
546 #vacuum_multixact_freeze_min_age = 5000000
547 #vacuum_multixact_freeze_table_age = 150000000
548 #bytea_output = 'hex' # hex, escape
549 #xmlbinary = 'base64'
550 #xmloption = 'content'
551 #gin_fuzzy_search_limit = 0
552 #gin_pending_list_limit = 4MB
554 # - Locale and Formatting -
556 datestyle = 'iso, mdy'
557 #intervalstyle = 'postgres'
558 timezone = 'US/Eastern'
559 #timezone_abbreviations = 'Default' # Select the set of available time zone
560 # abbreviations. Currently, there are
562 # Australia (historical usage)
564 # You can create your own file in
565 # share/timezonesets/.
566 #extra_float_digits = 0 # min -15, max 3
567 #client_encoding = sql_ascii # actually, defaults to database
570 # These settings are initialized by initdb, but they can be changed.
571 lc_messages = 'en_US.UTF-8' # locale for system error message
573 lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
574 lc_numeric = 'en_US.UTF-8' # locale for number formatting
575 lc_time = 'en_US.UTF-8' # locale for time formatting
577 # default configuration for text search
578 default_text_search_config = 'pg_catalog.english'
582 #dynamic_library_path = '$libdir'
583 #local_preload_libraries = ''
584 #session_preload_libraries = ''
587 #------------------------------------------------------------------------------
589 #------------------------------------------------------------------------------
591 #deadlock_timeout = 1s
592 #max_locks_per_transaction = 64 # min 10
593 # (change requires restart)
594 #max_pred_locks_per_transaction = 64 # min 10
595 # (change requires restart)
598 #------------------------------------------------------------------------------
599 # VERSION/PLATFORM COMPATIBILITY
600 #------------------------------------------------------------------------------
602 # - Previous PostgreSQL Versions -
605 #backslash_quote = safe_encoding # on, off, or safe_encoding
606 #default_with_oids = off
607 #escape_string_warning = on
608 #lo_compat_privileges = off
609 #operator_precedence_warning = off
610 #quote_all_identifiers = off
611 #sql_inheritance = on
612 #standard_conforming_strings = on
613 #synchronize_seqscans = on
615 # - Other Platforms and Clients -
617 #transform_null_equals = off
620 #------------------------------------------------------------------------------
622 #------------------------------------------------------------------------------
624 #exit_on_error = off # terminate session on any error?
625 #restart_after_crash = on # reinitialize after backend crash?
628 #------------------------------------------------------------------------------
629 # CONFIG FILE INCLUDES
630 #------------------------------------------------------------------------------
632 # These options allow settings to be loaded from files other than the
633 # default postgresql.conf.
635 #include_dir = 'conf.d' # include files ending in '.conf' from
637 #include_if_exists = 'exists.conf' # include file only if it exists
638 #include = 'special.conf' # include file
641 #------------------------------------------------------------------------------
643 #------------------------------------------------------------------------------
645 # Add settings for extensions here