]> granicus.if.org Git - postgresql/blob - src/backend/utils/misc/postgresql.conf.sample
Revert change to turn autovacuum on by default.
[postgresql] / src / backend / utils / misc / postgresql.conf.sample
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.)  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.
13 #
14 # Please note that re-commenting a setting is NOT sufficient to revert it
15 # to the default value, unless you restart the server.
16 #
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.
20 #
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
25 # to take effect.
26
27
28 #---------------------------------------------------------------------------
29 # FILE LOCATIONS
30 #---------------------------------------------------------------------------
31
32 # The default values of these variables are driven from the -D command line
33 # switch or PGDATA environment variable, represented here as ConfigDir.
34
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)
41
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)
45
46
47 #---------------------------------------------------------------------------
48 # CONNECTIONS AND AUTHENTICATION
49 #---------------------------------------------------------------------------
50
51 # - Connection Settings -
52
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)
69
70 # - Security & Authentication -
71
72 #authentication_timeout = 60            # 1-600, in seconds
73 #ssl = off                              # (change requires restart)
74 #password_encryption = on
75 #db_user_namespace = off
76
77 # Kerberos
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)
83
84 # - TCP Keepalives -
85 # see 'man 7 tcp' for details
86
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
93
94
95 #---------------------------------------------------------------------------
96 # RESOURCE USAGE (except WAL)
97 #---------------------------------------------------------------------------
98
99 # - Memory -
100
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
111
112 # - Free Space Map -
113
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)
118
119 # - Kernel Resource Usage -
120
121 #max_files_per_process = 1000           # min 25
122                                         # (change requires restart)
123 #shared_preload_libraries = ''          # (change requires restart)
124
125 # - Cost-Based Vacuum Delay -
126
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
132
133 # - Background writer -
134
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
140
141
142 #---------------------------------------------------------------------------
143 # WRITE AHEAD LOG
144 #---------------------------------------------------------------------------
145
146 # - Settings -
147
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:
151                                         #   open_datasync
152                                         #   fdatasync
153                                         #   fsync
154                                         #   fsync_writethrough
155                                         #   open_sync
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
161
162 # - Checkpoints -
163
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
167
168 # - Archiving -
169
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
173
174
175 #---------------------------------------------------------------------------
176 # QUERY TUNING
177 #---------------------------------------------------------------------------
178
179 # - Planner Method Configuration -
180
181 #enable_bitmapscan = on
182 #enable_hashagg = on
183 #enable_hashjoin = on
184 #enable_indexscan = on
185 #enable_mergejoin = on
186 #enable_nestloop = on
187 #enable_seqscan = on
188 #enable_sort = on
189 #enable_tidscan = on
190
191 # - Planner Cost Constants -
192
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
199
200 # - Genetic Query Optimizer -
201
202 #geqo = on
203 #geqo_threshold = 12
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
208
209 # - Other Planner Options -
210
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 
215                                         # JOINs
216
217
218 #---------------------------------------------------------------------------
219 # ERROR REPORTING AND LOGGING
220 #---------------------------------------------------------------------------
221
222 # - Where to Log -
223
224 #log_destination = 'stderr'             # Valid values are combinations of 
225                                         # stderr, syslog and eventlog, 
226                                         # depending on platform.
227
228 # This is used when logging to stderr:
229 #redirect_stderr = off                  # Enable capturing of stderr into log 
230                                         # files
231                                         # (change requires restart)
232
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
245                                         # in all cases.
246 #log_rotation_age = 1440                # Automatic rotation of logfiles will 
247                                         # happen after so many minutes.  0 to 
248                                         # disable.
249 #log_rotation_size = 10240              # Automatic rotation of logfiles will 
250                                         # happen after so many kilobytes of log
251                                         # output.  0 to disable.
252
253 # These are relevant when logging to syslog:
254 #syslog_facility = 'LOCAL0'
255 #syslog_ident = 'postgres'
256
257
258 # - When to Log -
259
260 #client_min_messages = notice           # Values, in order of decreasing detail:
261                                         #   debug5
262                                         #   debug4
263                                         #   debug3
264                                         #   debug2
265                                         #   debug1
266                                         #   log
267                                         #   notice
268                                         #   warning
269                                         #   error
270
271 #log_min_messages = notice              # Values, in order of decreasing detail:
272                                         #   debug5
273                                         #   debug4
274                                         #   debug3
275                                         #   debug2
276                                         #   debug1
277                                         #   info
278                                         #   notice
279                                         #   warning
280                                         #   error
281                                         #   log
282                                         #   fatal
283                                         #   panic
284
285 #log_error_verbosity = default          # terse, default, or verbose messages
286
287 #log_min_error_statement = panic        # Values in order of increasing severity:
288                                         #   debug5
289                                         #   debug4
290                                         #   debug3
291                                         #   debug2
292                                         #   debug1
293                                         #   info
294                                         #   notice
295                                         #   warning
296                                         #   error
297                                         #   panic(off)
298
299 #log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements
300                                         # and their durations, in milliseconds.
301
302 #silent_mode = off                      # DO NOT USE without syslog or 
303                                         # redirect_stderr
304                                         # (change requires restart)
305
306 # - What to Log -
307
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
314 #log_duration = off
315 #log_line_prefix = ''                   # Special values:
316                                         #   %u = user name
317                                         #   %d = database name
318                                         #   %r = remote host and port
319                                         #   %h = remote host
320                                         #   %p = PID
321                                         #   %t = timestamp (no milliseconds)
322                                         #   %m = timestamp with milliseconds
323                                         #   %i = command tag
324                                         #   %c = session id
325                                         #   %l = session line number
326                                         #   %s = session start timestamp
327                                         #   %x = transaction id
328                                         #   %q = stop here in non-session 
329                                         #        processes
330                                         #   %% = '%'
331                                         # e.g. '<%u%%%d> '
332 #log_statement = 'none'                 # none, ddl, mod, all
333 #log_hostname = off
334
335
336 #---------------------------------------------------------------------------
337 # RUNTIME STATISTICS
338 #---------------------------------------------------------------------------
339
340 # - Query/Index Statistics Collector -
341
342 #stats_command_string = on
343 #update_process_title = on
344
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)
350
351
352 # - Statistics Monitoring -
353
354 #log_parser_stats = off
355 #log_planner_stats = off
356 #log_executor_stats = off
357 #log_statement_stats = off
358
359
360 #---------------------------------------------------------------------------
361 # AUTOVACUUM PARAMETERS
362 #---------------------------------------------------------------------------
363
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
367                                         # vacuum
368 #autovacuum_analyze_threshold = 500     # min # of tuple updates before 
369                                         # analyze
370 #autovacuum_vacuum_scale_factor = 0.4   # fraction of rel size before 
371                                         # vacuum
372 #autovacuum_analyze_scale_factor = 0.2  # fraction of rel size before 
373                                         # analyze
374 #autovacuum_vacuum_cost_delay = -1      # default vacuum cost delay for 
375                                         # autovac, -1 means use 
376                                         # vacuum_cost_delay
377 #autovacuum_vacuum_cost_limit = -1      # default vacuum cost limit for 
378                                         # autovac, -1 means use
379                                         # vacuum_cost_limit
380
381
382 #---------------------------------------------------------------------------
383 # CLIENT CONNECTION DEFAULTS
384 #---------------------------------------------------------------------------
385
386 # - Statement Behavior -
387
388 #search_path = '"$user",public'         # schema names
389 #default_tablespace = ''                # a tablespace name, '' uses
390                                         # the default
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
395
396 # - Locale and Formatting -
397
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
403                                         #   Default
404                                         #   Australia
405                                         #   India
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
410                                         # encoding
411
412 # These settings are initialized by initdb -- they might be changed
413 #lc_messages = 'C'                      # locale for system error message 
414                                         # strings
415 #lc_monetary = 'C'                      # locale for monetary formatting
416 #lc_numeric = 'C'                       # locale for number formatting
417 #lc_time = 'C'                          # locale for time formatting
418
419 # - Other Defaults -
420
421 #explain_pretty_print = on
422 #dynamic_library_path = '$libdir'
423 #local_preload_libraries = ''
424
425
426 #---------------------------------------------------------------------------
427 # LOCK MANAGEMENT
428 #---------------------------------------------------------------------------
429
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)
435 # lock table slots.
436
437
438 #---------------------------------------------------------------------------
439 # VERSION/PLATFORM COMPATIBILITY
440 #---------------------------------------------------------------------------
441
442 # - Previous Postgres Versions -
443
444 #add_missing_from = off
445 #array_nulls = on
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
452
453 # - Other Platforms & Clients -
454
455 #transform_null_equals = off
456
457
458 #---------------------------------------------------------------------------
459 # CUSTOMIZED OPTIONS
460 #---------------------------------------------------------------------------
461
462 #custom_variable_classes = ''           # list of custom variable class names