1 # -----------------------------
2 # PostgreSQL configuration file
3 # -----------------------------
5 # This file consists of lines of the form:
9 # (The '=' is optional.) White space may be used. Comments are introduced
10 # with '#' anywhere on a line. The complete list of option names and
11 # allowed values can be found in the PostgreSQL documentation. The
12 # commented-out settings shown in this file represent the default values.
14 # Please note that re-commenting a setting is NOT sufficient to revert it
15 # to the default value, unless you restart the server.
17 # Any option can also be given as a command line switch to the server,
18 # e.g., 'postgres -c log_connections=on'. Some options can be changed at
19 # run-time with the 'SET' SQL command.
21 # This file is read on server startup and when the server receives a
22 # SIGHUP. If you edit the file on a running system, you have to SIGHUP the
23 # server for the changes to take effect, or use "pg_ctl reload". Some
24 # settings, which are marked below, require a server shutdown and restart
28 #---------------------------------------------------------------------------
30 #---------------------------------------------------------------------------
32 # The default values of these variables are driven from the -D command line
33 # switch or PGDATA environment variable, represented here as ConfigDir.
35 #data_directory = 'ConfigDir' # use data in another directory
36 # (change requires restart)
37 #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
38 # (change requires restart)
39 #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
40 # (change requires restart)
42 # If external_pid_file is not explicitly set, no extra PID file is written.
43 #external_pid_file = '(none)' # write an extra PID file
44 # (change requires restart)
47 #---------------------------------------------------------------------------
48 # CONNECTIONS AND AUTHENTICATION
49 #---------------------------------------------------------------------------
51 # - Connection Settings -
53 #listen_addresses = 'localhost' # what IP address(es) to listen on;
54 # comma-separated list of addresses;
55 # defaults to 'localhost', '*' = all
56 # (change requires restart)
57 #port = 5432 # (change requires restart)
58 #max_connections = 100 # (change requires restart)
59 # Note: increasing max_connections costs ~400 bytes of shared memory per
60 # connection slot, plus lock space (see max_locks_per_transaction). You
61 # might also need to raise shared_buffers to support more connections.
62 #superuser_reserved_connections = 2 # (change requires restart)
63 #unix_socket_directory = '' # (change requires restart)
64 #unix_socket_group = '' # (change requires restart)
65 #unix_socket_permissions = 0777 # octal
66 # (change requires restart)
67 #bonjour_name = '' # defaults to the computer name
68 # (change requires restart)
70 # - Security & Authentication -
72 #authentication_timeout = 60 # 1-600, in seconds
73 #ssl = off # (change requires restart)
74 #password_encryption = on
75 #db_user_namespace = off
78 #krb_server_keyfile = '' # (change requires restart)
79 #krb_srvname = 'postgres' # (change requires restart)
80 #krb_server_hostname = '' # empty string matches any keytab entry
81 # (change requires restart)
82 #krb_caseins_users = off # (change requires restart)
85 # see 'man 7 tcp' for details
87 #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
88 # 0 selects the system default
89 #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
90 # 0 selects the system default
91 #tcp_keepalives_count = 0 # TCP_KEEPCNT;
92 # 0 selects the system default
95 #---------------------------------------------------------------------------
96 # RESOURCE USAGE (except WAL)
97 #---------------------------------------------------------------------------
101 #shared_buffers = 1000 # min 16 or max_connections*2, 8kB each
102 # (change requires restart)
103 #temp_buffers = 1000 # min 100, 8kB each
104 #max_prepared_transactions = 5 # can be 0 or more
105 # (change requires restart)
106 # Note: increasing max_prepared_transactions costs ~600 bytes of shared memory
107 # per transaction slot, plus lock space (see max_locks_per_transaction).
108 #work_mem = 1024 # min 64, size in kB
109 #maintenance_work_mem = 16384 # min 1024, size in kB
110 #max_stack_depth = 2048 # min 100, size in kB
114 #max_fsm_pages = 20000 # min max_fsm_relations*16, 6 bytes each
115 # (change requires restart)
116 #max_fsm_relations = 1000 # min 100, ~70 bytes each
117 # (change requires restart)
119 # - Kernel Resource Usage -
121 #max_files_per_process = 1000 # min 25
122 # (change requires restart)
123 #shared_preload_libraries = '' # (change requires restart)
125 # - Cost-Based Vacuum Delay -
127 #vacuum_cost_delay = 0 # 0-1000 milliseconds
128 #vacuum_cost_page_hit = 1 # 0-10000 credits
129 #vacuum_cost_page_miss = 10 # 0-10000 credits
130 #vacuum_cost_page_dirty = 20 # 0-10000 credits
131 #vacuum_cost_limit = 200 # 0-10000 credits
133 # - Background writer -
135 #bgwriter_delay = 200 # 10-10000 milliseconds between rounds
136 #bgwriter_lru_percent = 1.0 # 0-100% of LRU buffers scanned/round
137 #bgwriter_lru_maxpages = 5 # 0-1000 buffers max written/round
138 #bgwriter_all_percent = 0.333 # 0-100% of all buffers scanned/round
139 #bgwriter_all_maxpages = 5 # 0-1000 buffers max written/round
142 #---------------------------------------------------------------------------
144 #---------------------------------------------------------------------------
148 #fsync = on # turns forced synchronization on or off
149 #wal_sync_method = fsync # the default is the first option
150 # supported by the operating system:
156 #full_page_writes = on # recover from partial page writes
157 #wal_buffers = 8 # min 4, 8kB each
158 # (change requires restart)
159 #commit_delay = 0 # range 0-100000, in microseconds
160 #commit_siblings = 5 # range 1-1000
164 #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
165 #checkpoint_timeout = 300 # range 30-3600, in seconds
166 #checkpoint_warning = 30 # in seconds, 0 is off
170 #archive_command = '' # command to use to archive a logfile segment
171 #archive_timeout = 0 # force a logfile segment switch after this
172 # many seconds; 0 is off
175 #---------------------------------------------------------------------------
177 #---------------------------------------------------------------------------
179 # - Planner Method Configuration -
181 #enable_bitmapscan = on
183 #enable_hashjoin = on
184 #enable_indexscan = on
185 #enable_mergejoin = on
186 #enable_nestloop = on
191 # - Planner Cost Constants -
193 #seq_page_cost = 1.0 # measured on an arbitrary scale
194 #random_page_cost = 4.0 # same scale as above
195 #cpu_tuple_cost = 0.01 # same scale as above
196 #cpu_index_tuple_cost = 0.005 # same scale as above
197 #cpu_operator_cost = 0.0025 # same scale as above
198 #effective_cache_size = 1000 # typically 8kB each
200 # - Genetic Query Optimizer -
204 #geqo_effort = 5 # range 1-10
205 #geqo_pool_size = 0 # selects default based on effort
206 #geqo_generations = 0 # selects default based on effort
207 #geqo_selection_bias = 2.0 # range 1.5-2.0
209 # - Other Planner Options -
211 #default_statistics_target = 10 # range 1-1000
212 #constraint_exclusion = off
213 #from_collapse_limit = 8
214 #join_collapse_limit = 8 # 1 disables collapsing of explicit
218 #---------------------------------------------------------------------------
219 # ERROR REPORTING AND LOGGING
220 #---------------------------------------------------------------------------
224 #log_destination = 'stderr' # Valid values are combinations of
225 # stderr, syslog and eventlog,
226 # depending on platform.
228 # This is used when logging to stderr:
229 #redirect_stderr = off # Enable capturing of stderr into log
231 # (change requires restart)
233 # These are only used if redirect_stderr is on:
234 #log_directory = 'pg_log' # Directory where log files are written
235 # Can be absolute or relative to PGDATA
236 #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
237 # Can include strftime() escapes
238 #log_truncate_on_rotation = off # If on, any existing log file of the same
239 # name as the new log file will be
240 # truncated rather than appended to. But
241 # such truncation only occurs on
242 # time-driven rotation, not on restarts
243 # or size-driven rotation. Default is
244 # off, meaning append to existing files
246 #log_rotation_age = 1440 # Automatic rotation of logfiles will
247 # happen after so many minutes. 0 to
249 #log_rotation_size = 10240 # Automatic rotation of logfiles will
250 # happen after so many kilobytes of log
251 # output. 0 to disable.
253 # These are relevant when logging to syslog:
254 #syslog_facility = 'LOCAL0'
255 #syslog_ident = 'postgres'
260 #client_min_messages = notice # Values, in order of decreasing detail:
271 #log_min_messages = notice # Values, in order of decreasing detail:
285 #log_error_verbosity = default # terse, default, or verbose messages
287 #log_min_error_statement = panic # Values in order of increasing severity:
299 #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
300 # and their durations, in milliseconds.
302 #silent_mode = off # DO NOT USE without syslog or
304 # (change requires restart)
308 #debug_print_parse = off
309 #debug_print_rewritten = off
310 #debug_print_plan = off
311 #debug_pretty_print = off
312 #log_connections = off
313 #log_disconnections = off
315 #log_line_prefix = '' # Special values:
318 # %r = remote host and port
321 # %t = timestamp (no milliseconds)
322 # %m = timestamp with milliseconds
325 # %l = session line number
326 # %s = session start timestamp
327 # %x = transaction id
328 # %q = stop here in non-session
332 #log_statement = 'none' # none, ddl, mod, all
336 #---------------------------------------------------------------------------
338 #---------------------------------------------------------------------------
340 # - Query/Index Statistics Collector -
342 #stats_command_string = on
343 #update_process_title = on
345 #stats_start_collector = on # needed for block or row stats
346 # (change requires restart)
347 #stats_block_level = off
348 #stats_row_level = off
349 #stats_reset_on_server_start = off # (change requires restart)
352 # - Statistics Monitoring -
354 #log_parser_stats = off
355 #log_planner_stats = off
356 #log_executor_stats = off
357 #log_statement_stats = off
360 #---------------------------------------------------------------------------
361 # AUTOVACUUM PARAMETERS
362 #---------------------------------------------------------------------------
364 #autovacuum = off # enable autovacuum subprocess?
365 #autovacuum_naptime = 60 # time between autovacuum runs, in secs
366 #autovacuum_vacuum_threshold = 1000 # min # of tuple updates before
368 #autovacuum_analyze_threshold = 500 # min # of tuple updates before
370 #autovacuum_vacuum_scale_factor = 0.4 # fraction of rel size before
372 #autovacuum_analyze_scale_factor = 0.2 # fraction of rel size before
374 #autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
375 # autovac, -1 means use
377 #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
378 # autovac, -1 means use
382 #---------------------------------------------------------------------------
383 # CLIENT CONNECTION DEFAULTS
384 #---------------------------------------------------------------------------
386 # - Statement Behavior -
388 #search_path = '"$user",public' # schema names
389 #default_tablespace = '' # a tablespace name, '' uses
391 #check_function_bodies = on
392 #default_transaction_isolation = 'read committed'
393 #default_transaction_read_only = off
394 #statement_timeout = 0 # 0 is disabled, in milliseconds
396 # - Locale and Formatting -
398 #datestyle = 'iso, mdy'
399 #timezone = unknown # actually, defaults to TZ
400 # environment setting
401 #timezone_abbreviations = 'Default' # select the set of available timezone
402 # abbreviations. Currently, there are
406 # However you can also create your own
407 # file in share/timezonesets/.
408 #extra_float_digits = 0 # min -15, max 2
409 #client_encoding = sql_ascii # actually, defaults to database
412 # These settings are initialized by initdb -- they might be changed
413 #lc_messages = 'C' # locale for system error message
415 #lc_monetary = 'C' # locale for monetary formatting
416 #lc_numeric = 'C' # locale for number formatting
417 #lc_time = 'C' # locale for time formatting
421 #explain_pretty_print = on
422 #dynamic_library_path = '$libdir'
423 #local_preload_libraries = ''
426 #---------------------------------------------------------------------------
428 #---------------------------------------------------------------------------
430 #deadlock_timeout = 1000 # in milliseconds
431 #max_locks_per_transaction = 64 # min 10
432 # (change requires restart)
433 # Note: each lock table slot uses ~270 bytes of shared memory, and there are
434 # max_locks_per_transaction * (max_connections + max_prepared_transactions)
438 #---------------------------------------------------------------------------
439 # VERSION/PLATFORM COMPATIBILITY
440 #---------------------------------------------------------------------------
442 # - Previous Postgres Versions -
444 #add_missing_from = off
446 #backslash_quote = safe_encoding # on, off, or safe_encoding
447 #default_with_oids = off
448 #escape_string_warning = on
449 #standard_conforming_strings = off
450 #regex_flavor = advanced # advanced, extended, or basic
451 #sql_inheritance = on
453 # - Other Platforms & Clients -
455 #transform_null_equals = off
458 #---------------------------------------------------------------------------
460 #---------------------------------------------------------------------------
462 #custom_variable_classes = '' # list of custom variable class names