Line # Revision Author
1 8 ahitrov@rambler.ru # -----------------------------
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 postmaster.
16 #
17 # Any option can also be given as a command line switch to the
18 # postmaster, e.g. 'postmaster -c log_connections=on'. Some options
19 # can be changed at run-time with the 'SET' SQL command.
20 #
21 # This file is read on postmaster startup and when the postmaster
22 # receives a SIGHUP. If you edit the file on a running system, you have
23 # to SIGHUP the postmaster for the changes to take effect, or use
24 # "pg_ctl reload". Some settings, such as listen_address, require
25 # a postmaster shutdown and restart 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 #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
37 #ident_file = 'ConfigDir/pg_ident.conf # IDENT configuration file
38
39 # If external_pid_file is not explicitly set, no extra pid file is written.
40 #external_pid_file = '(none)' # write an extra pid file
41
42
43 #---------------------------------------------------------------------------
44 # CONNECTIONS AND AUTHENTICATION
45 #---------------------------------------------------------------------------
46
47 # - Connection Settings -
48
49 listen_addresses = ''
50 #listen_addresses = 'localhost' # what IP address(es) to listen on;
51 # comma-separated list of addresses;
52 # defaults to 'localhost', '*' = all
53 port = @PGSQL_PORT@
54 max_connections = 50
55 # note: increasing max_connections costs ~400 bytes of shared memory per
56 # connection slot, plus lock space (see max_locks_per_transaction). You
57 # might also need to raise shared_buffers to support more connections.
58 superuser_reserved_connections = 3
59 #unix_socket_directory = ''
60 #unix_socket_group = ''
61 #unix_socket_permissions = 0777 # octal
62 #bonjour_name = '' # defaults to the computer name
63
64 # - Security & Authentication -
65
66 #authentication_timeout = 60 # 1-600, in seconds
67 #ssl = off
68 #password_encryption = on
69 #db_user_namespace = off
70
71 # Kerberos
72 #krb_server_keyfile = ''
73 #krb_srvname = 'postgres'
74 #krb_server_hostname = '' # empty string matches any keytab entry
75 #krb_caseins_users = off
76
77 # - TCP Keepalives -
78 # see 'man 7 tcp' for details
79
80 #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
81 # 0 selects the system default
82 #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
83 # 0 selects the system default
84 #tcp_keepalives_count = 0 # TCP_KEEPCNT;
85 # 0 selects the system default
86
87
88 #---------------------------------------------------------------------------
89 # RESOURCE USAGE (except WAL)
90 #---------------------------------------------------------------------------
91
92 # - Memory -
93
94 shared_buffers = 12800
95 work_mem = 10240
96 maintenance_work_mem = 20480
97
98 #temp_buffers = 1000 # min 100, 8KB each
99 #max_prepared_transactions = 5 # can be 0 or more
100 # note: increasing max_prepared_transactions costs ~600 bytes of shared memory
101 # per transaction slot, plus lock space (see max_locks_per_transaction).
102 #max_stack_depth = 2048 # min 100, size in KB
103
104 # - Free Space Map -
105
106 max_fsm_pages = 200000 # min max_fsm_relations*16, 6 bytes each
107 max_fsm_relations = 1000 # min 100, ~70 bytes each
108
109 # - Kernel Resource Usage -
110
111 #max_files_per_process = 1000 # min 25
112 #preload_libraries = ''
113
114 # - Cost-Based Vacuum Delay -
115
116 vacuum_cost_delay = 5 # 0-1000 milliseconds
117 vacuum_cost_page_hit = 1 # 0-10000 credits
118 vacuum_cost_page_miss = 5 # 0-10000 credits
119 vacuum_cost_page_dirty = 2 # 0-10000 credits
120 vacuum_cost_limit = 1 # 0-10000 credits
121
122 # - Background writer -
123
124 bgwriter_delay = 2000 # 10-10000 milliseconds between rounds
125 bgwriter_lru_percent = 5.0 # 0-100% of LRU buffers scanned/round
126 bgwriter_lru_maxpages = 50 # 0-1000 buffers max written/round
127 #bgwriter_all_percent = 0.333 # 0-100% of all buffers scanned/round
128 bgwriter_all_maxpages = 50 # 0-1000 buffers max written/round
129
130
131 #---------------------------------------------------------------------------
132 # WRITE AHEAD LOG
133 #---------------------------------------------------------------------------
134
135 # - Settings -
136
137 #fsync = on # turns forced synchronization on or off
138 #wal_sync_method = fsync # the default is the first option
139 # supported by the operating system:
140 # open_datasync
141 # fdatasync
142 # fsync
143 # fsync_writethrough
144 # open_sync
145 #full_page_writes = on # recover from partial page writes
146 #wal_buffers = 8 # min 4, 8KB each
147 #commit_delay = 0 # range 0-100000, in microseconds
148 #commit_siblings = 5 # range 1-1000
149
150 # - Checkpoints -
151
152 #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
153 #checkpoint_timeout = 300 # range 30-3600, in seconds
154 #checkpoint_warning = 30 # in seconds, 0 is off
155
156 # - Archiving -
157
158 #archive_command = '' # command to use to archive a logfile
159 # segment
160
161
162 #---------------------------------------------------------------------------
163 # QUERY TUNING
164 #---------------------------------------------------------------------------
165
166 # - Planner Method Configuration -
167
168 #enable_bitmapscan = on
169 #enable_hashagg = on
170 #enable_hashjoin = on
171 #enable_indexscan = on
172 #enable_mergejoin = on
173 #enable_nestloop = on
174 #enable_seqscan = on
175 #enable_sort = on
176 #enable_tidscan = on
177
178 # - Planner Cost Constants -
179
180 effective_cache_size = 25600 # typically 8KB each
181 random_page_cost = 1.5 # units are one sequential page fetch
182 # cost
183 #cpu_tuple_cost = 0.01 # (same)
184 #cpu_index_tuple_cost = 0.001 # (same)
185 #cpu_operator_cost = 0.0025 # (same)
186
187 # - Genetic Query Optimizer -
188
189 #geqo = on
190 #geqo_threshold = 12
191 #geqo_effort = 5 # range 1-10
192 #geqo_pool_size = 0 # selects default based on effort
193 #geqo_generations = 0 # selects default based on effort
194 #geqo_selection_bias = 2.0 # range 1.5-2.0
195
196 # - Other Planner Options -
197
198 default_statistics_target = 50 # range 1-1000
199 #constraint_exclusion = off
200 #from_collapse_limit = 8
201 #join_collapse_limit = 8 # 1 disables collapsing of explicit
202 # JOINs
203
204
205 #---------------------------------------------------------------------------
206 # ERROR REPORTING AND LOGGING
207 #---------------------------------------------------------------------------
208
209 # - Where to Log -
210 #log_destination = 'stderr' # Valid values are combinations of
211 # stderr, syslog and eventlog,
212 # depending on platform.
213
214 # This is used when logging to stderr:
215 redirect_stderr = @PGSQL_REDIRECT@ # Enable capturing of stderr into log
216 # files
217
218 # These are only used if redirect_stderr is on:
219 log_directory = '@ROOT_LOG@' # Directory where log files are written
220 # Can be absolute or relative to PGDATA
221 log_filename = 'postgresql-%Y-%m-%d.log' # Log file name pattern.
222 # Can include strftime() escapes
223 #log_truncate_on_rotation = off # If on, any existing log file of the same
224 # name as the new log file will be
225 # truncated rather than appended to. But
226 # such truncation only occurs on
227 # time-driven rotation, not on restarts
228 # or size-driven rotation. Default is
229 # off, meaning append to existing files
230 # in all cases.
231 log_rotation_age = 1440 # Automatic rotation of logfiles will
232 # happen after so many minutes. 0 to
233 # disable.
234 log_rotation_size = 0 # Automatic rotation of logfiles will
235 # happen after so many kilobytes of log
236 # output. 0 to disable.
237
238 # These are relevant when logging to syslog:
239 #syslog_facility = 'LOCAL0'
240 #syslog_ident = 'postgres'
241
242
243 # - When to Log -
244
245 #client_min_messages = notice # Values, in order of decreasing detail:
246 # debug5
247 # debug4
248 # debug3
249 # debug2
250 # debug1
251 # log
252 # notice
253 # warning
254 # error
255
256 #log_min_messages = notice # Values, in order of decreasing detail:
257 # debug5
258 # debug4
259 # debug3
260 # debug2
261 # debug1
262 # info
263 # notice
264 # warning
265 # error
266 # log
267 # fatal
268 # panic
269
270 #log_error_verbosity = default # terse, default, or verbose messages
271
272 #log_min_error_statement = panic # Values in order of increasing severity:
273 # debug5
274 # debug4
275 # debug3
276 # debug2
277 # debug1
278 # info
279 # notice
280 # warning
281 # error
282 # panic(off)
283
284 log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements
285 # and their durations, in milliseconds.
286
287 #silent_mode = off # DO NOT USE without syslog or
288 # redirect_stderr
289
290 # - What to Log -
291
292 #debug_print_parse = off
293 #debug_print_rewritten = off
294 #debug_print_plan = off
295 #debug_pretty_print = off
296 #log_connections = off
297 #log_disconnections = off
298 #log_duration = off
299 log_line_prefix = '%t %p %u@%h %d ' # Special values:
300 # %u = user name
301 # %d = database name
302 # %r = remote host and port
303 # %h = remote host
304 # %p = PID
305 # %t = timestamp (no milliseconds)
306 # %m = timestamp with milliseconds
307 # %i = command tag
308 # %c = session id
309 # %l = session line number
310 # %s = session start timestamp
311 # %x = transaction id
312 # %q = stop here in non-session
313 # processes
314 # %% = '%'
315 # e.g. '<%u%%%d> '
316 #log_statement = 'none' # none, mod, ddl, all
317 #log_hostname = off
318
319
320 #---------------------------------------------------------------------------
321 # RUNTIME STATISTICS
322 #---------------------------------------------------------------------------
323
324 # - Statistics Monitoring -
325
326 #log_parser_stats = off
327 #log_planner_stats = off
328 #log_executor_stats = off
329 #log_statement_stats = off
330
331 # - Query/Index Statistics Collector -
332
333 stats_start_collector = on
334 stats_command_string = on
335 stats_block_level = on
336 stats_row_level = on
337 stats_reset_on_server_start = off
338
339
340 #---------------------------------------------------------------------------
341 # AUTOVACUUM PARAMETERS
342 #---------------------------------------------------------------------------
343
344 autovacuum = on # enable autovacuum subprocess?
345 autovacuum_naptime = 600 # time between autovacuum runs, in secs
346 autovacuum_vacuum_threshold = 10 # min # of tuple updates before
347 # vacuum
348 autovacuum_analyze_threshold = 20 # min # of tuple updates before
349 # analyze
350 autovacuum_vacuum_scale_factor = 0.1 # fraction of rel size before
351 # vacuum
352 autovacuum_analyze_scale_factor = 0.2 # fraction of rel size before
353 # analyze
354 #autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
355 # autovac, -1 means use
356 # vacuum_cost_delay
357 #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
358 # autovac, -1 means use
359 # vacuum_cost_limit
360
361
362 #---------------------------------------------------------------------------
363 # CLIENT CONNECTION DEFAULTS
364 #---------------------------------------------------------------------------
365
366 # - Statement Behavior -
367
368 #search_path = '$user,public' # schema names
369 #default_tablespace = '' # a tablespace name, '' uses
370 # the default
371 #check_function_bodies = on
372 #default_transaction_isolation = 'read committed'
373 #default_transaction_read_only = off
374 #statement_timeout = 0 # 0 is disabled, in milliseconds
375
376 # - Locale and Formatting -
377
378 datestyle = 'iso, dmy'
379 #timezone = unknown # actually, defaults to TZ
380 # environment setting
381 #australian_timezones = off
382 #extra_float_digits = 0 # min -15, max 2
383 #client_encoding = sql_ascii # actually, defaults to database
384 # encoding
385
386 # These settings are initialized by initdb -- they might be changed
387 lc_messages = 'ru_RU.UTF-8' # locale for system error message
388 # strings
389 lc_monetary = 'ru_RU.UTF-8' # locale for monetary formatting
390 lc_numeric = 'ru_RU.UTF-8' # locale for number formatting
391 lc_time = 'ru_RU.UTF-8' # locale for time formatting
392
393 # - Other Defaults -
394
395 #explain_pretty_print = on
396 #dynamic_library_path = '$libdir'
397
398
399 #---------------------------------------------------------------------------
400 # LOCK MANAGEMENT
401 #---------------------------------------------------------------------------
402
403 deadlock_timeout = 60000 # in milliseconds
404 #max_locks_per_transaction = 64 # min 10
405 # note: each lock table slot uses ~220 bytes of shared memory, and there are
406 # max_locks_per_transaction * (max_connections + max_prepared_transactions)
407 # lock table slots.
408
409
410 #---------------------------------------------------------------------------
411 # VERSION/PLATFORM COMPATIBILITY
412 #---------------------------------------------------------------------------
413
414 # - Previous Postgres Versions -
415
416 #add_missing_from = off
417 #regex_flavor = advanced # advanced, extended, or basic
418 #sql_inheritance = on
419 #default_with_oids = off
420 #escape_string_warning = off
421
422 # - Other Platforms & Clients -
423
424 #transform_null_equals = off
425
426
427 #---------------------------------------------------------------------------
428 # CUSTOMIZED OPTIONS
429 #---------------------------------------------------------------------------
430
431 #custom_variable_classes = '' # list of custom variable class names