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