server_maint 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/.gitmodules +21 -0
  2. data/lib/cookbooks/aws/CHANGELOG.md +11 -0
  3. data/lib/cookbooks/aws/CONTRIBUTING +29 -0
  4. data/lib/cookbooks/aws/LICENSE +201 -0
  5. data/lib/cookbooks/aws/README.md +271 -0
  6. data/lib/cookbooks/aws/attributes/default.rb +20 -0
  7. data/lib/cookbooks/aws/libraries/ec2.rb +58 -0
  8. data/lib/cookbooks/aws/metadata.rb +7 -0
  9. data/lib/cookbooks/aws/providers/ebs_volume.rb +236 -0
  10. data/lib/cookbooks/aws/providers/elastic_ip.rb +90 -0
  11. data/lib/cookbooks/aws/providers/elastic_lb.rb +24 -0
  12. data/lib/cookbooks/aws/providers/resource_tag.rb +93 -0
  13. data/lib/cookbooks/aws/recipes/default.rb +25 -0
  14. data/lib/cookbooks/aws/resources/ebs_volume.rb +17 -0
  15. data/lib/cookbooks/aws/resources/elastic_ip.rb +11 -0
  16. data/lib/cookbooks/aws/resources/elastic_lb.rb +10 -0
  17. data/lib/cookbooks/aws/resources/resource_tag.rb +11 -0
  18. data/lib/cookbooks/database/.gitignore +1 -0
  19. data/lib/cookbooks/database/CHANGELOG.md +51 -0
  20. data/lib/cookbooks/database/CONTRIBUTING +29 -0
  21. data/lib/cookbooks/database/LICENSE +201 -0
  22. data/lib/cookbooks/database/README.md +468 -0
  23. data/lib/cookbooks/database/libraries/provider_database_mysql.rb +103 -0
  24. data/lib/cookbooks/database/libraries/provider_database_mysql_user.rb +76 -0
  25. data/lib/cookbooks/database/libraries/provider_database_postgresql.rb +131 -0
  26. data/lib/cookbooks/database/libraries/provider_database_postgresql_user.rb +83 -0
  27. data/lib/cookbooks/database/libraries/provider_database_sql_server.rb +109 -0
  28. data/lib/cookbooks/database/libraries/provider_database_sql_server_user.rb +106 -0
  29. data/lib/cookbooks/database/libraries/resource_database.rb +119 -0
  30. data/lib/cookbooks/database/libraries/resource_database_user.rb +90 -0
  31. data/lib/cookbooks/database/libraries/resource_mysql_database.rb +34 -0
  32. data/lib/cookbooks/database/libraries/resource_mysql_database_user.rb +34 -0
  33. data/lib/cookbooks/database/libraries/resource_postgresql_database.rb +35 -0
  34. data/lib/cookbooks/database/libraries/resource_postgresql_database_user.rb +35 -0
  35. data/lib/cookbooks/database/libraries/resource_sql_server_database.rb +34 -0
  36. data/lib/cookbooks/database/libraries/resource_sql_server_database_user.rb +34 -0
  37. data/lib/cookbooks/database/metadata.rb +22 -0
  38. data/lib/cookbooks/database/recipes/default.rb +20 -0
  39. data/lib/cookbooks/database/recipes/ebs_backup.rb +89 -0
  40. data/lib/cookbooks/database/recipes/ebs_volume.rb +204 -0
  41. data/lib/cookbooks/database/recipes/master.rb +78 -0
  42. data/lib/cookbooks/database/recipes/mysql.rb +20 -0
  43. data/lib/cookbooks/database/recipes/postgresql.rb +20 -0
  44. data/lib/cookbooks/database/recipes/snapshot.rb +62 -0
  45. data/lib/cookbooks/database/templates/default/app_grants.sql.erb +8 -0
  46. data/lib/cookbooks/database/templates/default/aws_config.erb +3 -0
  47. data/lib/cookbooks/database/templates/default/chef-solo-database-snapshot.cron.erb +6 -0
  48. data/lib/cookbooks/database/templates/default/chef-solo-database-snapshot.json.erb +1 -0
  49. data/lib/cookbooks/database/templates/default/chef-solo-database-snapshot.rb.erb +6 -0
  50. data/lib/cookbooks/database/templates/default/ebs-backup-cron.erb +2 -0
  51. data/lib/cookbooks/database/templates/default/ebs-db-backup.sh.erb +8 -0
  52. data/lib/cookbooks/database/templates/default/ebs-db-restore.sh.erb +10 -0
  53. data/lib/cookbooks/database/templates/default/s3cfg.erb +27 -0
  54. data/lib/cookbooks/mysql/.gitignore +5 -0
  55. data/lib/cookbooks/mysql/CHANGELOG.md +86 -0
  56. data/lib/cookbooks/mysql/CONTRIBUTING +29 -0
  57. data/lib/cookbooks/mysql/Gemfile +8 -0
  58. data/lib/cookbooks/mysql/LICENSE +201 -0
  59. data/lib/cookbooks/mysql/README.md +227 -0
  60. data/lib/cookbooks/mysql/attributes/client.rb +50 -0
  61. data/lib/cookbooks/mysql/attributes/server.rb +153 -0
  62. data/lib/cookbooks/mysql/files/default/tests/minitest/server_test.rb +36 -0
  63. data/lib/cookbooks/mysql/files/default/tests/minitest/support/helpers.rb +11 -0
  64. data/lib/cookbooks/mysql/libraries/helpers.rb +33 -0
  65. data/lib/cookbooks/mysql/metadata.rb +140 -0
  66. data/lib/cookbooks/mysql/recipes/client.rb +59 -0
  67. data/lib/cookbooks/mysql/recipes/default.rb +20 -0
  68. data/lib/cookbooks/mysql/recipes/ruby.rb +36 -0
  69. data/lib/cookbooks/mysql/recipes/server.rb +216 -0
  70. data/lib/cookbooks/mysql/recipes/server_ec2.rb +51 -0
  71. data/lib/cookbooks/mysql/templates/default/debian.cnf.erb +12 -0
  72. data/lib/cookbooks/mysql/templates/default/grants.sql.erb +15 -0
  73. data/lib/cookbooks/mysql/templates/default/my.cnf.erb +211 -0
  74. data/lib/cookbooks/mysql/templates/default/mysql-server.seed.erb +10 -0
  75. data/lib/cookbooks/mysql/templates/default/port_mysql.erb +3 -0
  76. data/lib/cookbooks/mysql/templates/windows/my.cnf.erb +61 -0
  77. data/lib/cookbooks/mysql/test/features/query_database.feature +26 -0
  78. data/lib/cookbooks/mysql/test/features/step_definitions/mysql_steps.rb +47 -0
  79. data/lib/cookbooks/mysql/test/features/support/env.rb +3 -0
  80. data/lib/cookbooks/mysql/test/features/support/mysql_helpers.rb +51 -0
  81. data/lib/cookbooks/mysql/test/kitchen/Kitchenfile +5 -0
  82. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/.gitignore +1 -0
  83. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/README.md +63 -0
  84. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/attributes/default.rb +27 -0
  85. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/metadata.rb +10 -0
  86. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/recipes/client.rb +20 -0
  87. data/lib/cookbooks/mysql/test/kitchen/cookbooks/mysql_test/recipes/server.rb +72 -0
  88. data/lib/cookbooks/openssl/CHANGELOG.md +0 -0
  89. data/lib/cookbooks/openssl/CONTRIBUTING +29 -0
  90. data/lib/cookbooks/openssl/LICENSE +201 -0
  91. data/lib/cookbooks/openssl/README.md +37 -0
  92. data/lib/cookbooks/openssl/libraries/secure_password.rb +37 -0
  93. data/lib/cookbooks/openssl/metadata.rb +8 -0
  94. data/lib/cookbooks/openssl/recipes/default.rb +19 -0
  95. data/lib/cookbooks/postgresql/CHANGELOG.md +35 -0
  96. data/lib/cookbooks/postgresql/CONTRIBUTING +29 -0
  97. data/lib/cookbooks/postgresql/LICENSE +201 -0
  98. data/lib/cookbooks/postgresql/README.md +148 -0
  99. data/lib/cookbooks/postgresql/attributes/default.rb +103 -0
  100. data/lib/cookbooks/postgresql/metadata.rb +21 -0
  101. data/lib/cookbooks/postgresql/recipes/client.rb +26 -0
  102. data/lib/cookbooks/postgresql/recipes/default.rb +20 -0
  103. data/lib/cookbooks/postgresql/recipes/ruby.rb +40 -0
  104. data/lib/cookbooks/postgresql/recipes/server.rb +64 -0
  105. data/lib/cookbooks/postgresql/recipes/server_debian.rb +64 -0
  106. data/lib/cookbooks/postgresql/recipes/server_redhat.rb +77 -0
  107. data/lib/cookbooks/postgresql/templates/default/debian.postgresql.conf.erb +499 -0
  108. data/lib/cookbooks/postgresql/templates/default/pg_hba.conf.erb +83 -0
  109. data/lib/cookbooks/postgresql/templates/default/redhat.postgresql.conf.erb +501 -0
  110. data/lib/cookbooks/sqlite/.gitignore +4 -0
  111. data/lib/cookbooks/sqlite/CHANGELOG.md +3 -0
  112. data/lib/cookbooks/sqlite/CONTRIBUTING +29 -0
  113. data/lib/cookbooks/sqlite/Gemfile +2 -0
  114. data/lib/cookbooks/sqlite/LICENSE +201 -0
  115. data/lib/cookbooks/sqlite/README.md +36 -0
  116. data/lib/cookbooks/sqlite/metadata.rb +12 -0
  117. data/lib/cookbooks/sqlite/recipes/default.rb +30 -0
  118. data/lib/cookbooks/sqlite/test/kitchen/Kitchenfile +1 -0
  119. data/lib/cookbooks/xfs/CHANGELOG.md +0 -0
  120. data/lib/cookbooks/xfs/CONTRIBUTING +29 -0
  121. data/lib/cookbooks/xfs/LICENSE +201 -0
  122. data/lib/cookbooks/xfs/README.md +30 -0
  123. data/lib/cookbooks/xfs/metadata.rb +12 -0
  124. data/lib/cookbooks/xfs/recipes/default.rb +26 -0
  125. data/lib/server_maint/version.rb +1 -1
  126. metadata +127 -4
@@ -0,0 +1,499 @@
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.) 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.
12
+ #
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.
16
+ #
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
21
+ # take effect.
22
+ #
23
+ # Any parameter can also be given as a command-line option to the server, e.g.,
24
+ # "postgres -c log_connections=on". Some paramters can be changed at run time
25
+ # with the "SET" SQL command.
26
+ #
27
+ # Memory units: kB = kilobytes MB = megabytes GB = gigabytes
28
+ # Time units: ms = milliseconds s = seconds min = minutes h = hours d = days
29
+
30
+
31
+ #------------------------------------------------------------------------------
32
+ # FILE LOCATIONS
33
+ #------------------------------------------------------------------------------
34
+
35
+ # The default values of these variables are driven from the -D command-line
36
+ # option or PGDATA environment variable, represented here as ConfigDir.
37
+
38
+ data_directory = '/var/lib/postgresql/<%= node.postgresql.version -%>/main' # use data in another directory
39
+ # (change requires restart)
40
+ hba_file = '/etc/postgresql/<%= node.postgresql.version -%>/main/pg_hba.conf' # host-based authentication file
41
+ # (change requires restart)
42
+ ident_file = '/etc/postgresql/<%= node.postgresql.version -%>/main/pg_ident.conf' # ident configuration file
43
+ # (change requires restart)
44
+
45
+ # If external_pid_file is not explicitly set, no extra PID file is written.
46
+ external_pid_file = '/var/run/postgresql/<%= node.postgresql.version -%>-main.pid' # write an extra PID file
47
+ # (change requires restart)
48
+
49
+
50
+ #------------------------------------------------------------------------------
51
+ # CONNECTIONS AND AUTHENTICATION
52
+ #------------------------------------------------------------------------------
53
+
54
+ # - Connection Settings -
55
+
56
+ listen_addresses = '<%= node.postgresql.listen_addresses -%>' # what IP address(es) to listen on;
57
+ # comma-separated list of addresses;
58
+ # defaults to 'localhost', '*' = all
59
+ # (change requires restart)
60
+ port = 5432 # (change requires restart)
61
+ max_connections = 100 # (change requires restart)
62
+ # Note: Increasing max_connections costs ~400 bytes of shared memory per
63
+ # connection slot, plus lock space (see max_locks_per_transaction). You might
64
+ # also need to raise shared_buffers to support more connections.
65
+ #superuser_reserved_connections = 3 # (change requires restart)
66
+ unix_socket_directory = '/var/run/postgresql' # (change requires restart)
67
+ #unix_socket_group = '' # (change requires restart)
68
+ #unix_socket_permissions = 0777 # begin with 0 to use octal notation
69
+ # (change requires restart)
70
+ #bonjour_name = '' # defaults to the computer name
71
+ # (change requires restart)
72
+
73
+ # - Security and Authentication -
74
+
75
+ #authentication_timeout = 1min # 1s-600s
76
+ <% if node.postgresql.ssl -%>
77
+ ssl = true # (change requires restart)
78
+ <% else -%>
79
+ #ssl = off # (change requires restart)
80
+ <% end -%>
81
+ #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers
82
+ # (change requires restart)
83
+ #password_encryption = on
84
+ #db_user_namespace = off
85
+
86
+ # Kerberos and GSSAPI
87
+ #krb_server_keyfile = '' # (change requires restart)
88
+ #krb_srvname = 'postgres' # (change requires restart, Kerberos only)
89
+ #krb_server_hostname = '' # empty string matches any keytab entry
90
+ # (change requires restart, Kerberos only)
91
+ #krb_caseins_users = off # (change requires restart)
92
+ #krb_realm = '' # (change requires restart)
93
+
94
+ # - TCP Keepalives -
95
+ # see "man 7 tcp" for details
96
+
97
+ #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
98
+ # 0 selects the system default
99
+ #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
100
+ # 0 selects the system default
101
+ #tcp_keepalives_count = 0 # TCP_KEEPCNT;
102
+ # 0 selects the system default
103
+
104
+
105
+ #------------------------------------------------------------------------------
106
+ # RESOURCE USAGE (except WAL)
107
+ #------------------------------------------------------------------------------
108
+
109
+ # - Memory -
110
+
111
+ shared_buffers = 24MB # min 128kB or max_connections*16kB
112
+ # (change requires restart)
113
+ #temp_buffers = 8MB # min 800kB
114
+ #max_prepared_transactions = 5 # can be 0 or more
115
+ # (change requires restart)
116
+ # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
117
+ # per transaction slot, plus lock space (see max_locks_per_transaction).
118
+ #work_mem = 1MB # min 64kB
119
+ #maintenance_work_mem = 16MB # min 1MB
120
+ #max_stack_depth = 2MB # min 100kB
121
+
122
+ # - Free Space Map -
123
+
124
+ <% if node['postgresql']['version'].to_f < 8.4 -%>
125
+ max_fsm_pages = 153600 # min max_fsm_relations*16, 6 bytes each
126
+ # (change requires restart)
127
+ #max_fsm_relations = 1000 # min 100, ~70 bytes each
128
+ # (change requires restart)
129
+ <% end -%>
130
+
131
+ # - Kernel Resource Usage -
132
+
133
+ #max_files_per_process = 1000 # min 25
134
+ # (change requires restart)
135
+ #shared_preload_libraries = '' # (change requires restart)
136
+
137
+ # - Cost-Based Vacuum Delay -
138
+
139
+ #vacuum_cost_delay = 0 # 0-1000 milliseconds
140
+ #vacuum_cost_page_hit = 1 # 0-10000 credits
141
+ #vacuum_cost_page_miss = 10 # 0-10000 credits
142
+ #vacuum_cost_page_dirty = 20 # 0-10000 credits
143
+ #vacuum_cost_limit = 200 # 1-10000 credits
144
+
145
+ # - Background Writer -
146
+
147
+ #bgwriter_delay = 200ms # 10-10000ms between rounds
148
+ #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
149
+ #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
150
+
151
+
152
+ #------------------------------------------------------------------------------
153
+ # WRITE AHEAD LOG
154
+ #------------------------------------------------------------------------------
155
+
156
+ # - Settings -
157
+
158
+ #fsync = on # turns forced synchronization on or off
159
+ #synchronous_commit = on # immediate fsync at commit
160
+ #wal_sync_method = fsync # the default is the first option
161
+ # supported by the operating system:
162
+ # open_datasync
163
+ # fdatasync
164
+ # fsync
165
+ # fsync_writethrough
166
+ # open_sync
167
+ #full_page_writes = on # recover from partial page writes
168
+ #wal_buffers = 64kB # min 32kB
169
+ # (change requires restart)
170
+ #wal_writer_delay = 200ms # 1-10000 milliseconds
171
+
172
+ #commit_delay = 0 # range 0-100000, in microseconds
173
+ #commit_siblings = 5 # range 1-1000
174
+
175
+ # - Checkpoints -
176
+
177
+ #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
178
+ #checkpoint_timeout = 5min # range 30s-1h
179
+ #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
180
+ #checkpoint_warning = 30s # 0 is off
181
+
182
+ # - Archiving -
183
+
184
+ #archive_mode = off # allows archiving to be done
185
+ # (change requires restart)
186
+ #archive_command = '' # command to use to archive a logfile segment
187
+ #archive_timeout = 0 # force a logfile segment switch after this
188
+ # time; 0 is off
189
+
190
+
191
+ #------------------------------------------------------------------------------
192
+ # QUERY TUNING
193
+ #------------------------------------------------------------------------------
194
+
195
+ # - Planner Method Configuration -
196
+
197
+ #enable_bitmapscan = on
198
+ #enable_hashagg = on
199
+ #enable_hashjoin = on
200
+ #enable_indexscan = on
201
+ #enable_mergejoin = on
202
+ #enable_nestloop = on
203
+ #enable_seqscan = on
204
+ #enable_sort = on
205
+ #enable_tidscan = on
206
+
207
+ # - Planner Cost Constants -
208
+
209
+ #seq_page_cost = 1.0 # measured on an arbitrary scale
210
+ #random_page_cost = 4.0 # same scale as above
211
+ #cpu_tuple_cost = 0.01 # same scale as above
212
+ #cpu_index_tuple_cost = 0.005 # same scale as above
213
+ #cpu_operator_cost = 0.0025 # same scale as above
214
+ #effective_cache_size = 128MB
215
+
216
+ # - Genetic Query Optimizer -
217
+
218
+ #geqo = on
219
+ #geqo_threshold = 12
220
+ #geqo_effort = 5 # range 1-10
221
+ #geqo_pool_size = 0 # selects default based on effort
222
+ #geqo_generations = 0 # selects default based on effort
223
+ #geqo_selection_bias = 2.0 # range 1.5-2.0
224
+
225
+ # - Other Planner Options -
226
+
227
+ #default_statistics_target = 10 # range 1-1000
228
+ #constraint_exclusion = off
229
+ #from_collapse_limit = 8
230
+ #join_collapse_limit = 8 # 1 disables collapsing of explicit
231
+ # JOIN clauses
232
+
233
+
234
+ #------------------------------------------------------------------------------
235
+ # ERROR REPORTING AND LOGGING
236
+ #------------------------------------------------------------------------------
237
+
238
+ # - Where to Log -
239
+
240
+ #log_destination = 'stderr' # Valid values are combinations of
241
+ # stderr, csvlog, syslog and eventlog,
242
+ # depending on platform. csvlog
243
+ # requires logging_collector to be on.
244
+
245
+ # This is used when logging to stderr:
246
+ #logging_collector = off # Enable capturing of stderr and csvlog
247
+ # into log files. Required to be on for
248
+ # csvlogs.
249
+ # (change requires restart)
250
+
251
+ # These are only used if logging_collector is on:
252
+ #log_directory = 'pg_log' # directory where log files are written,
253
+ # can be absolute or relative to PGDATA
254
+ #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
255
+ # can include strftime() escapes
256
+ #log_truncate_on_rotation = off # If on, an existing log file of the
257
+ # same name as the new log file will be
258
+ # truncated rather than appended to.
259
+ # But such truncation only occurs on
260
+ # time-driven rotation, not on restarts
261
+ # or size-driven rotation. Default is
262
+ # off, meaning append to existing files
263
+ # in all cases.
264
+ #log_rotation_age = 1d # Automatic rotation of logfiles will
265
+ # happen after that time. 0 to disable.
266
+ #log_rotation_size = 10MB # Automatic rotation of logfiles will
267
+ # happen after that much log output.
268
+ # 0 to disable.
269
+
270
+ # These are relevant when logging to syslog:
271
+ #syslog_facility = 'LOCAL0'
272
+ #syslog_ident = 'postgres'
273
+
274
+
275
+ # - When to Log -
276
+
277
+ #client_min_messages = notice # values in order of decreasing detail:
278
+ # debug5
279
+ # debug4
280
+ # debug3
281
+ # debug2
282
+ # debug1
283
+ # log
284
+ # notice
285
+ # warning
286
+ # error
287
+
288
+ #log_min_messages = notice # values in order of decreasing detail:
289
+ # debug5
290
+ # debug4
291
+ # debug3
292
+ # debug2
293
+ # debug1
294
+ # info
295
+ # notice
296
+ # warning
297
+ # error
298
+ # log
299
+ # fatal
300
+ # panic
301
+
302
+ #log_error_verbosity = default # terse, default, or verbose messages
303
+
304
+ #log_min_error_statement = error # values in order of decreasing detail:
305
+ # debug5
306
+ # debug4
307
+ # debug3
308
+ # debug2
309
+ # debug1
310
+ # info
311
+ # notice
312
+ # warning
313
+ # error
314
+ # log
315
+ # fatal
316
+ # panic (effectively off)
317
+
318
+ #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
319
+ # and their durations, > 0 logs only
320
+ # statements running at least this time.
321
+
322
+ #silent_mode = off # DO NOT USE without syslog or
323
+ # logging_collector
324
+ # (change requires restart)
325
+
326
+ # - What to Log -
327
+
328
+ #debug_print_parse = off
329
+ #debug_print_rewritten = off
330
+ #debug_print_plan = off
331
+ #debug_pretty_print = off
332
+ #log_checkpoints = off
333
+ #log_connections = off
334
+ #log_disconnections = off
335
+ #log_duration = off
336
+ #log_hostname = off
337
+ log_line_prefix = '%t ' # special values:
338
+ # %u = user name
339
+ # %d = database name
340
+ # %r = remote host and port
341
+ # %h = remote host
342
+ # %p = process ID
343
+ # %t = timestamp without milliseconds
344
+ # %m = timestamp with milliseconds
345
+ # %i = command tag
346
+ # %c = session ID
347
+ # %l = session line number
348
+ # %s = session start timestamp
349
+ # %v = virtual transaction ID
350
+ # %x = transaction ID (0 if none)
351
+ # %q = stop here in non-session
352
+ # processes
353
+ # %% = '%'
354
+ # e.g. '<%%u%%%d> '
355
+ #log_lock_waits = off # log lock waits >= deadlock_timeout
356
+ #log_statement = 'none' # none, ddl, mod, all
357
+ #log_temp_files = -1 # log temporary files equal or larger
358
+ # than specified size;
359
+ # -1 disables, 0 logs all temp files
360
+ #log_timezone = unknown # actually, defaults to TZ environment
361
+ # setting
362
+
363
+
364
+ #------------------------------------------------------------------------------
365
+ # RUNTIME STATISTICS
366
+ #------------------------------------------------------------------------------
367
+
368
+ # - Query/Index Statistics Collector -
369
+
370
+ #track_activities = on
371
+ #track_counts = on
372
+ #update_process_title = on
373
+
374
+
375
+ # - Statistics Monitoring -
376
+
377
+ #log_parser_stats = off
378
+ #log_planner_stats = off
379
+ #log_executor_stats = off
380
+ #log_statement_stats = off
381
+
382
+
383
+ #------------------------------------------------------------------------------
384
+ # AUTOVACUUM PARAMETERS
385
+ #------------------------------------------------------------------------------
386
+
387
+ #autovacuum = on # Enable autovacuum subprocess? 'on'
388
+ # requires track_counts to also be on.
389
+ #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
390
+ # their durations, > 0 logs only
391
+ # actions running at least that time.
392
+ #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
393
+ #autovacuum_naptime = 1min # time between autovacuum runs
394
+ #autovacuum_vacuum_threshold = 50 # min number of row updates before
395
+ # vacuum
396
+ #autovacuum_analyze_threshold = 50 # min number of row updates before
397
+ # analyze
398
+ #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
399
+ #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
400
+ #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
401
+ # (change requires restart)
402
+ #autovacuum_vacuum_cost_delay = 20 # default vacuum cost delay for
403
+ # autovacuum, -1 means use
404
+ # vacuum_cost_delay
405
+ #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
406
+ # autovacuum, -1 means use
407
+ # vacuum_cost_limit
408
+
409
+
410
+ #------------------------------------------------------------------------------
411
+ # CLIENT CONNECTION DEFAULTS
412
+ #------------------------------------------------------------------------------
413
+
414
+ # - Statement Behavior -
415
+
416
+ #search_path = '"$user",public' # schema names
417
+ #default_tablespace = '' # a tablespace name, '' uses the default
418
+ #temp_tablespaces = '' # a list of tablespace names, '' uses
419
+ # only default tablespace
420
+ #check_function_bodies = on
421
+ #default_transaction_isolation = 'read committed'
422
+ #default_transaction_read_only = off
423
+ #session_replication_role = 'origin'
424
+ #statement_timeout = 0 # 0 is disabled
425
+ #vacuum_freeze_min_age = 100000000
426
+ #xmlbinary = 'base64'
427
+ #xmloption = 'content'
428
+
429
+ # - Locale and Formatting -
430
+
431
+ datestyle = 'iso, mdy'
432
+ #timezone = unknown # actually, defaults to TZ environment
433
+ # setting
434
+ #timezone_abbreviations = 'Default' # Select the set of available time zone
435
+ # abbreviations. Currently, there are
436
+ # Default
437
+ # Australia
438
+ # India
439
+ # You can create your own file in
440
+ # share/timezonesets/.
441
+ #extra_float_digits = 0 # min -15, max 2
442
+ #client_encoding = sql_ascii # actually, defaults to database
443
+ # encoding
444
+
445
+ # These settings are initialized by initdb, but they can be changed.
446
+ #lc_messages = 'en_US.UTF-8' # locale for system error message
447
+ # strings
448
+ #lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
449
+ #lc_numeric = 'en_US.UTF-8' # locale for number formatting
450
+ #lc_time = 'en_US.UTF-8' # locale for time formatting
451
+
452
+ # default configuration for text search
453
+ default_text_search_config = 'pg_catalog.english'
454
+
455
+ # - Other Defaults -
456
+
457
+ #explain_pretty_print = on
458
+ #dynamic_library_path = '$libdir'
459
+ #local_preload_libraries = ''
460
+
461
+
462
+ #------------------------------------------------------------------------------
463
+ # LOCK MANAGEMENT
464
+ #------------------------------------------------------------------------------
465
+
466
+ #deadlock_timeout = 1s
467
+ #max_locks_per_transaction = 64 # min 10
468
+ # (change requires restart)
469
+ # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
470
+ # max_locks_per_transaction * (max_connections + max_prepared_transactions)
471
+ # lock table slots.
472
+
473
+
474
+ #------------------------------------------------------------------------------
475
+ # VERSION/PLATFORM COMPATIBILITY
476
+ #------------------------------------------------------------------------------
477
+
478
+ # - Previous PostgreSQL Versions -
479
+
480
+ #add_missing_from = off
481
+ #array_nulls = on
482
+ #backslash_quote = safe_encoding # on, off, or safe_encoding
483
+ #default_with_oids = off
484
+ #escape_string_warning = on
485
+ #regex_flavor = advanced # advanced, extended, or basic
486
+ #sql_inheritance = on
487
+ #standard_conforming_strings = off
488
+ #synchronize_seqscans = on
489
+
490
+ # - Other Platforms and Clients -
491
+
492
+ #transform_null_equals = off
493
+
494
+
495
+ #------------------------------------------------------------------------------
496
+ # CUSTOMIZED OPTIONS
497
+ #------------------------------------------------------------------------------
498
+
499
+ #custom_variable_classes = '' # list of custom variable class names
@@ -0,0 +1,83 @@
1
+ # PostgreSQL Client Authentication Configuration File
2
+ # ===================================================
3
+ #
4
+ # Refer to the "Client Authentication" section in the
5
+ # PostgreSQL documentation for a complete description
6
+ # of this file. A short synopsis follows.
7
+ #
8
+ # This file controls: which hosts are allowed to connect, how clients
9
+ # are authenticated, which PostgreSQL user names they can use, which
10
+ # databases they can access. Records take one of these forms:
11
+ #
12
+ # local DATABASE USER METHOD [OPTION]
13
+ # host DATABASE USER CIDR-ADDRESS METHOD [OPTION]
14
+ # hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTION]
15
+ # hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTION]
16
+ #
17
+ # (The uppercase items must be replaced by actual values.)
18
+ #
19
+ # The first field is the connection type: "local" is a Unix-domain socket,
20
+ # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
21
+ # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
22
+ #
23
+ # DATABASE can be "all", "sameuser", "samerole", a database name, or
24
+ # a comma-separated list thereof.
25
+ #
26
+ # USER can be "all", a user name, a group name prefixed with "+", or
27
+ # a comma-separated list thereof. In both the DATABASE and USER fields
28
+ # you can also write a file name prefixed with "@" to include names from
29
+ # a separate file.
30
+ #
31
+ # CIDR-ADDRESS specifies the set of hosts the record matches.
32
+ # It is made up of an IP address and a CIDR mask that is an integer
33
+ # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
34
+ # the number of significant bits in the mask. Alternatively, you can write
35
+ # an IP address and netmask in separate columns to specify the set of hosts.
36
+ #
37
+ # METHOD can be "trust", "reject", "md5", "crypt", "password", "gss", "sspi",
38
+ # "krb5", "ident", "pam" or "ldap". Note that "password" sends passwords
39
+ # in clear text; "md5" is preferred since it sends encrypted passwords.
40
+ #
41
+ # OPTION is the ident map or the name of the PAM service, depending on METHOD.
42
+ #
43
+ # Database and user names containing spaces, commas, quotes and other special
44
+ # characters must be quoted. Quoting one of the keywords "all", "sameuser" or
45
+ # "samerole" makes the name lose its special character, and just match a
46
+ # database or username with that name.
47
+ #
48
+ # This file is read on server startup and when the postmaster receives
49
+ # a SIGHUP signal. If you edit the file on a running system, you have
50
+ # to SIGHUP the postmaster for the changes to take effect. You can use
51
+ # "pg_ctl reload" to do that.
52
+
53
+ # Put your actual configuration here
54
+ # ----------------------------------
55
+ #
56
+ # If you want to allow non-local connections, you need to add more
57
+ # "host" records. In that case you will also need to make PostgreSQL listen
58
+ # on a non-local interface via the listen_addresses configuration parameter,
59
+ # or via the -i or -h command line switches.
60
+ #
61
+
62
+
63
+
64
+
65
+ # DO NOT DISABLE!
66
+ # If you change this first entry you will need to make sure that the
67
+ # database
68
+ # super user can access the database using some other method.
69
+ # Noninteractive
70
+ # access to all databases is required during automatic maintenance
71
+ # (autovacuum, daily cronjob, replication, and similar tasks).
72
+ #
73
+ # Database administrative login by UNIX sockets
74
+ local all postgres ident
75
+
76
+ # TYPE DATABASE USER CIDR-ADDRESS METHOD
77
+
78
+ # "local" is for Unix domain socket connections only
79
+ local all all ident
80
+ # IPv4 local connections:
81
+ host all all 127.0.0.1/32 md5
82
+ # IPv6 local connections:
83
+ host all all ::1/128 md5