elzar 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data/.chef/knife.rb +3 -0
  2. data/.gitignore +1 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +11 -0
  5. data/Gemfile.lock +96 -0
  6. data/README.md +42 -0
  7. data/Rakefile +1 -0
  8. data/Vagrantfile +16 -0
  9. data/cookbooks/.gitkeep +0 -0
  10. data/cookbooks/apt/README.md +122 -0
  11. data/cookbooks/apt/files/default/apt-cacher +9 -0
  12. data/cookbooks/apt/files/default/apt-cacher.conf +144 -0
  13. data/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
  14. data/cookbooks/apt/metadata.rb +13 -0
  15. data/cookbooks/apt/providers/repository.rb +73 -0
  16. data/cookbooks/apt/recipes/cacher-client.rb +44 -0
  17. data/cookbooks/apt/recipes/cacher.rb +45 -0
  18. data/cookbooks/apt/recipes/default.rb +50 -0
  19. data/cookbooks/apt/resources/repository.rb +30 -0
  20. data/cookbooks/build-essential/README.md +24 -0
  21. data/cookbooks/build-essential/metadata.rb +10 -0
  22. data/cookbooks/build-essential/recipes/default.rb +45 -0
  23. data/cookbooks/database/README.md +403 -0
  24. data/cookbooks/database/libraries/provider_database_mysql.rb +97 -0
  25. data/cookbooks/database/libraries/provider_database_mysql_user.rb +76 -0
  26. data/cookbooks/database/libraries/provider_database_postgresql.rb +126 -0
  27. data/cookbooks/database/libraries/provider_database_postgresql_user.rb +78 -0
  28. data/cookbooks/database/libraries/provider_database_sql_server.rb +109 -0
  29. data/cookbooks/database/libraries/provider_database_sql_server_user.rb +106 -0
  30. data/cookbooks/database/libraries/resource_database.rb +111 -0
  31. data/cookbooks/database/libraries/resource_database_user.rb +90 -0
  32. data/cookbooks/database/libraries/resource_mysql_database.rb +34 -0
  33. data/cookbooks/database/libraries/resource_mysql_database_user.rb +34 -0
  34. data/cookbooks/database/libraries/resource_postgresql_database.rb +35 -0
  35. data/cookbooks/database/libraries/resource_postgresql_database_user.rb +35 -0
  36. data/cookbooks/database/libraries/resource_sql_server_database.rb +34 -0
  37. data/cookbooks/database/libraries/resource_sql_server_database_user.rb +34 -0
  38. data/cookbooks/database/metadata.rb +21 -0
  39. data/cookbooks/database/recipes/default.rb +20 -0
  40. data/cookbooks/database/recipes/ebs_backup.rb +89 -0
  41. data/cookbooks/database/recipes/ebs_volume.rb +196 -0
  42. data/cookbooks/database/recipes/master.rb +78 -0
  43. data/cookbooks/database/recipes/snapshot.rb +62 -0
  44. data/cookbooks/database/templates/default/app_grants.sql.erb +8 -0
  45. data/cookbooks/database/templates/default/aws_config.erb +3 -0
  46. data/cookbooks/database/templates/default/chef-solo-database-snapshot.cron.erb +10 -0
  47. data/cookbooks/database/templates/default/chef-solo-database-snapshot.json.erb +1 -0
  48. data/cookbooks/database/templates/default/chef-solo-database-snapshot.rb.erb +6 -0
  49. data/cookbooks/database/templates/default/ebs-backup-cron.erb +2 -0
  50. data/cookbooks/database/templates/default/ebs-db-backup.sh.erb +8 -0
  51. data/cookbooks/database/templates/default/ebs-db-restore.sh.erb +10 -0
  52. data/cookbooks/database/templates/default/s3cfg.erb +27 -0
  53. data/cookbooks/mysql/README.md +148 -0
  54. data/cookbooks/mysql/attributes/server.rb +68 -0
  55. data/cookbooks/mysql/libraries/database.rb +19 -0
  56. data/cookbooks/mysql/libraries/helpers.rb +33 -0
  57. data/cookbooks/mysql/metadata.rb +90 -0
  58. data/cookbooks/mysql/recipes/client.rb +51 -0
  59. data/cookbooks/mysql/recipes/default.rb +20 -0
  60. data/cookbooks/mysql/recipes/server.rb +133 -0
  61. data/cookbooks/mysql/recipes/server_ec2.rb +49 -0
  62. data/cookbooks/mysql/templates/default/debian.cnf.erb +12 -0
  63. data/cookbooks/mysql/templates/default/grants.sql.erb +15 -0
  64. data/cookbooks/mysql/templates/default/my.cnf.erb +176 -0
  65. data/cookbooks/mysql/templates/default/mysql-server.seed.erb +10 -0
  66. data/cookbooks/mysql/templates/default/port_mysql.erb +3 -0
  67. data/cookbooks/openssl/README.md +37 -0
  68. data/cookbooks/openssl/libraries/secure_password.rb +37 -0
  69. data/cookbooks/openssl/metadata.rb +8 -0
  70. data/cookbooks/openssl/recipes/default.rb +19 -0
  71. data/cookbooks/passenger_enterprise/README.rdoc +8 -0
  72. data/cookbooks/passenger_enterprise/attributes/default.rb +28 -0
  73. data/cookbooks/passenger_enterprise/cc.gemspec +36 -0
  74. data/cookbooks/passenger_enterprise/metadata.json +44 -0
  75. data/cookbooks/passenger_enterprise/metadata.rb +16 -0
  76. data/cookbooks/passenger_enterprise/recipes/apache2.rb +54 -0
  77. data/cookbooks/passenger_enterprise/recipes/default.rb +30 -0
  78. data/cookbooks/passenger_enterprise/recipes/nginx.rb +50 -0
  79. data/cookbooks/passenger_enterprise/templates/default/passenger.conf.erb +2 -0
  80. data/cookbooks/passenger_enterprise/templates/default/passenger.load.erb +1 -0
  81. data/cookbooks/passenger_enterprise/templates/default/passenger_nginx.conf.erb +2 -0
  82. data/cookbooks/ruby_enterprise/README.rdoc +55 -0
  83. data/cookbooks/ruby_enterprise/attributes/default.rb +33 -0
  84. data/cookbooks/ruby_enterprise/cc.gemspec +36 -0
  85. data/cookbooks/ruby_enterprise/definitions/ree_gem.rb +28 -0
  86. data/cookbooks/ruby_enterprise/metadata.json +45 -0
  87. data/cookbooks/ruby_enterprise/metadata.rb +13 -0
  88. data/cookbooks/ruby_enterprise/recipes/default.rb +67 -0
  89. data/data_bags/deploy/authorized_keys.json +9 -0
  90. data/dna.json +25 -0
  91. data/elzar.gemspec +22 -0
  92. data/lib/elzar.rb +21 -0
  93. data/lib/elzar/assistant.rb +77 -0
  94. data/lib/elzar/chef_dna.rb +48 -0
  95. data/lib/elzar/template.rb +24 -0
  96. data/lib/elzar/templates/Gemfile +11 -0
  97. data/lib/elzar/templates/Vagrantfile.erb +16 -0
  98. data/lib/elzar/templates/dna.json +25 -0
  99. data/lib/elzar/templates/solo.rb.erb +6 -0
  100. data/lib/elzar/version.rb +3 -0
  101. data/roles/enterprise_appstack.rb +4 -0
  102. data/roles/plumbing.rb +11 -0
  103. data/roles/postgres_database.rb +4 -0
  104. data/roles/ruby_appstack.rb +4 -0
  105. data/script/install_cookbook +6 -0
  106. data/script/new_cookbook +5 -0
  107. data/site-cookbooks/.gitkeep +0 -0
  108. data/site-cookbooks/curl/README.md +17 -0
  109. data/site-cookbooks/curl/metadata.rb +6 -0
  110. data/site-cookbooks/curl/recipes/default.rb +11 -0
  111. data/site-cookbooks/nginx/CHANGELOG.md +11 -0
  112. data/site-cookbooks/nginx/CONTRIBUTING +29 -0
  113. data/site-cookbooks/nginx/LICENSE +201 -0
  114. data/site-cookbooks/nginx/README.md +76 -0
  115. data/site-cookbooks/nginx/attributes/default.rb +65 -0
  116. data/site-cookbooks/nginx/definitions/nginx_site.rb +35 -0
  117. data/site-cookbooks/nginx/files/default/mime.types +73 -0
  118. data/site-cookbooks/nginx/metadata.rb +89 -0
  119. data/site-cookbooks/nginx/recipes/default.rb +57 -0
  120. data/site-cookbooks/nginx/recipes/source.rb +126 -0
  121. data/site-cookbooks/nginx/templates/default/default-site.erb +11 -0
  122. data/site-cookbooks/nginx/templates/default/nginx.conf.erb +42 -0
  123. data/site-cookbooks/nginx/templates/default/nginx.init.erb +91 -0
  124. data/site-cookbooks/nginx/templates/default/nxdissite.erb +29 -0
  125. data/site-cookbooks/nginx/templates/default/nxensite.erb +38 -0
  126. data/site-cookbooks/passenger/README.md +12 -0
  127. data/site-cookbooks/passenger/attributes/default.rb +3 -0
  128. data/site-cookbooks/passenger/metadata.rb +6 -0
  129. data/site-cookbooks/passenger/recipes/default.rb +39 -0
  130. data/site-cookbooks/passenger/templates/default/passenger_nginx.conf.erb +2 -0
  131. data/site-cookbooks/postgresql/README.md +150 -0
  132. data/site-cookbooks/postgresql/attributes/default.rb +72 -0
  133. data/site-cookbooks/postgresql/metadata.rb +21 -0
  134. data/site-cookbooks/postgresql/recipes/client.rb +40 -0
  135. data/site-cookbooks/postgresql/recipes/default.rb +20 -0
  136. data/site-cookbooks/postgresql/recipes/server.rb +74 -0
  137. data/site-cookbooks/postgresql/recipes/server_debian.rb +62 -0
  138. data/site-cookbooks/postgresql/recipes/server_redhat.rb +82 -0
  139. data/site-cookbooks/postgresql/templates/default/debian.postgresql.conf.erb +499 -0
  140. data/site-cookbooks/postgresql/templates/default/pg_hba.conf.erb +83 -0
  141. data/site-cookbooks/postgresql/templates/default/redhat.postgresql.conf.erb +501 -0
  142. data/site-cookbooks/rails_app/README.md +15 -0
  143. data/site-cookbooks/rails_app/attributes/default.rb +2 -0
  144. data/site-cookbooks/rails_app/files/default/sudoers +26 -0
  145. data/site-cookbooks/rails_app/metadata.rb +6 -0
  146. data/site-cookbooks/rails_app/recipes/default.rb +143 -0
  147. data/site-cookbooks/rails_app/recipes/system_libraries.rb +12 -0
  148. data/site-cookbooks/rails_app/templates/default/pg_hba.conf.erb +84 -0
  149. data/site-cookbooks/rails_app/templates/default/rails_app_nginx.erb +10 -0
  150. data/site-cookbooks/ruby/README.md +12 -0
  151. data/site-cookbooks/ruby/attributes/default.rb +6 -0
  152. data/site-cookbooks/ruby/metadata.rb +6 -0
  153. data/site-cookbooks/ruby/recipes/default.rb +54 -0
  154. data/solo.rb +7 -0
  155. data/upgrade-chef.sh +8 -0
  156. metadata +272 -0
@@ -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
@@ -0,0 +1,501 @@
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 parameters can be changed at run time
25
+ # with the "SET" SQL command.
26
+ #
27
+ # Memory units: kB = kilobytes Time units: ms = milliseconds
28
+ # MB = megabytes s = seconds
29
+ # GB = gigabytes min = minutes
30
+ # h = hours
31
+ # d = days
32
+
33
+
34
+ #------------------------------------------------------------------------------
35
+ # FILE LOCATIONS
36
+ #------------------------------------------------------------------------------
37
+
38
+ # The default values of these variables are driven from the -D command-line
39
+ # option or PGDATA environment variable, represented here as ConfigDir.
40
+
41
+ #data_directory = 'ConfigDir' # use data in another directory
42
+ # (change requires restart)
43
+ #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
44
+ # (change requires restart)
45
+ #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
46
+ # (change requires restart)
47
+
48
+ # If external_pid_file is not explicitly set, no extra PID file is written.
49
+ #external_pid_file = '(none)' # write an extra PID file
50
+ # (change requires restart)
51
+
52
+
53
+ #------------------------------------------------------------------------------
54
+ # CONNECTIONS AND AUTHENTICATION
55
+ #------------------------------------------------------------------------------
56
+
57
+ # - Connection Settings -
58
+
59
+ #listen_addresses = 'localhost' # what IP address(es) to listen on;
60
+ # comma-separated list of addresses;
61
+ # defaults to 'localhost', '*' = all
62
+ # (change requires restart)
63
+ #port = 5432 # (change requires restart)
64
+ max_connections = 100 # (change requires restart)
65
+ # Note: Increasing max_connections costs ~400 bytes of shared memory per
66
+ # connection slot, plus lock space (see max_locks_per_transaction).
67
+ #superuser_reserved_connections = 3 # (change requires restart)
68
+ #unix_socket_directory = '' # (change requires restart)
69
+ #unix_socket_group = '' # (change requires restart)
70
+ #unix_socket_permissions = 0777 # begin with 0 to use octal notation
71
+ # (change requires restart)
72
+ #bonjour_name = '' # defaults to the computer name
73
+ # (change requires restart)
74
+
75
+ # - Security and Authentication -
76
+
77
+ #authentication_timeout = 1min # 1s-600s
78
+ #ssl = off # (change requires restart)
79
+ #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers
80
+ # (change requires restart)
81
+ #ssl_renegotiation_limit = 512MB # amount of data between renegotiations
82
+ #password_encryption = on
83
+ #db_user_namespace = off
84
+
85
+ # Kerberos and GSSAPI
86
+ #krb_server_keyfile = ''
87
+ #krb_srvname = 'postgres' # (Kerberos only)
88
+ #krb_caseins_users = off
89
+
90
+ # - TCP Keepalives -
91
+ # see "man 7 tcp" for details
92
+
93
+ #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
94
+ # 0 selects the system default
95
+ #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
96
+ # 0 selects the system default
97
+ #tcp_keepalives_count = 0 # TCP_KEEPCNT;
98
+ # 0 selects the system default
99
+
100
+
101
+ #------------------------------------------------------------------------------
102
+ # RESOURCE USAGE (except WAL)
103
+ #------------------------------------------------------------------------------
104
+
105
+ # - Memory -
106
+
107
+ shared_buffers = 32MB # min 128kB
108
+ # (change requires restart)
109
+ #temp_buffers = 8MB # min 800kB
110
+ #max_prepared_transactions = 0 # zero disables the feature
111
+ # (change requires restart)
112
+ # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
113
+ # per transaction slot, plus lock space (see max_locks_per_transaction).
114
+ # It is not advisable to set max_prepared_transactions nonzero unless you
115
+ # actively intend to use prepared transactions.
116
+ #work_mem = 1MB # min 64kB
117
+ #maintenance_work_mem = 16MB # min 1MB
118
+ #max_stack_depth = 2MB # min 100kB
119
+
120
+ # - Kernel Resource Usage -
121
+
122
+ #max_files_per_process = 1000 # min 25
123
+ # (change requires restart)
124
+ #shared_preload_libraries = '' # (change requires restart)
125
+
126
+ # - Cost-Based Vacuum Delay -
127
+
128
+ #vacuum_cost_delay = 0ms # 0-100 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 # 1-10000 credits
133
+
134
+ # - Background Writer -
135
+
136
+ #bgwriter_delay = 200ms # 10-10000ms between rounds
137
+ #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
138
+ #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
139
+
140
+ # - Asynchronous Behavior -
141
+
142
+ #effective_io_concurrency = 1 # 1-1000. 0 disables prefetching
143
+
144
+
145
+ #------------------------------------------------------------------------------
146
+ # WRITE AHEAD LOG
147
+ #------------------------------------------------------------------------------
148
+
149
+ # - Settings -
150
+
151
+ #fsync = on # turns forced synchronization on or off
152
+ #synchronous_commit = on # immediate fsync at commit
153
+ #wal_sync_method = fsync # the default is the first option
154
+ # supported by the operating system:
155
+ # open_datasync
156
+ # fdatasync
157
+ # fsync
158
+ # fsync_writethrough
159
+ # open_sync
160
+ #full_page_writes = on # recover from partial page writes
161
+ #wal_buffers = 64kB # min 32kB
162
+ # (change requires restart)
163
+ #wal_writer_delay = 200ms # 1-10000 milliseconds
164
+
165
+ #commit_delay = 0 # range 0-100000, in microseconds
166
+ #commit_siblings = 5 # range 1-1000
167
+
168
+ # - Checkpoints -
169
+
170
+ #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
171
+ #checkpoint_timeout = 5min # range 30s-1h
172
+ #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
173
+ #checkpoint_warning = 30s # 0 disables
174
+
175
+ # - Archiving -
176
+
177
+ #archive_mode = off # allows archiving to be done
178
+ # (change requires restart)
179
+ #archive_command = '' # command to use to archive a logfile segment
180
+ #archive_timeout = 0 # force a logfile segment switch after this
181
+ # number of seconds; 0 disables
182
+
183
+
184
+ #------------------------------------------------------------------------------
185
+ # QUERY TUNING
186
+ #------------------------------------------------------------------------------
187
+
188
+ # - Planner Method Configuration -
189
+
190
+ #enable_bitmapscan = on
191
+ #enable_hashagg = on
192
+ #enable_hashjoin = on
193
+ #enable_indexscan = on
194
+ #enable_mergejoin = on
195
+ #enable_nestloop = on
196
+ #enable_seqscan = on
197
+ #enable_sort = on
198
+ #enable_tidscan = on
199
+
200
+ # - Planner Cost Constants -
201
+
202
+ #seq_page_cost = 1.0 # measured on an arbitrary scale
203
+ #random_page_cost = 4.0 # same scale as above
204
+ #cpu_tuple_cost = 0.01 # same scale as above
205
+ #cpu_index_tuple_cost = 0.005 # same scale as above
206
+ #cpu_operator_cost = 0.0025 # same scale as above
207
+ #effective_cache_size = 128MB
208
+
209
+ # - Genetic Query Optimizer -
210
+
211
+ #geqo = on
212
+ #geqo_threshold = 12
213
+ #geqo_effort = 5 # range 1-10
214
+ #geqo_pool_size = 0 # selects default based on effort
215
+ #geqo_generations = 0 # selects default based on effort
216
+ #geqo_selection_bias = 2.0 # range 1.5-2.0
217
+
218
+ # - Other Planner Options -
219
+
220
+ #default_statistics_target = 100 # range 1-10000
221
+ #constraint_exclusion = partition # on, off, or partition
222
+ #cursor_tuple_fraction = 0.1 # range 0.0-1.0
223
+ #from_collapse_limit = 8
224
+ #join_collapse_limit = 8 # 1 disables collapsing of explicit
225
+ # JOIN clauses
226
+
227
+
228
+ #------------------------------------------------------------------------------
229
+ # ERROR REPORTING AND LOGGING
230
+ #------------------------------------------------------------------------------
231
+
232
+ # - Where to Log -
233
+
234
+ #log_destination = 'stderr' # Valid values are combinations of
235
+ # stderr, csvlog, syslog and eventlog,
236
+ # depending on platform. csvlog
237
+ # requires logging_collector to be on.
238
+
239
+ # This is used when logging to stderr:
240
+ logging_collector = on # Enable capturing of stderr and csvlog
241
+ # into log files. Required to be on for
242
+ # csvlogs.
243
+ # (change requires restart)
244
+
245
+ # These are only used if logging_collector is on:
246
+ log_directory = 'pg_log' # directory where log files are written,
247
+ # can be absolute or relative to PGDATA
248
+ log_filename = 'postgresql-%a.log' # log file name pattern,
249
+ # can include strftime() escapes
250
+ log_truncate_on_rotation = on # If on, an existing log file of the
251
+ # same name as the new log file will be
252
+ # truncated rather than appended to.
253
+ # But such truncation only occurs on
254
+ # time-driven rotation, not on restarts
255
+ # or size-driven rotation. Default is
256
+ # off, meaning append to existing files
257
+ # in all cases.
258
+ log_rotation_age = 1d # Automatic rotation of logfiles will
259
+ # happen after that time. 0 disables.
260
+ log_rotation_size = 0 # Automatic rotation of logfiles will
261
+ # happen after that much log output.
262
+ # 0 disables.
263
+
264
+ # These are relevant when logging to syslog:
265
+ #syslog_facility = 'LOCAL0'
266
+ #syslog_ident = 'postgres'
267
+
268
+ #silent_mode = off # Run server silently.
269
+ # DO NOT USE without syslog or
270
+ # logging_collector
271
+ # (change requires restart)
272
+
273
+
274
+ # - When to Log -
275
+
276
+ #client_min_messages = notice # values in order of decreasing detail:
277
+ # debug5
278
+ # debug4
279
+ # debug3
280
+ # debug2
281
+ # debug1
282
+ # log
283
+ # notice
284
+ # warning
285
+ # error
286
+
287
+ #log_min_messages = warning # values in order of decreasing detail:
288
+ # debug5
289
+ # debug4
290
+ # debug3
291
+ # debug2
292
+ # debug1
293
+ # info
294
+ # notice
295
+ # warning
296
+ # error
297
+ # log
298
+ # fatal
299
+ # panic
300
+
301
+ #log_error_verbosity = default # terse, default, or verbose messages
302
+
303
+ #log_min_error_statement = error # values in order of decreasing detail:
304
+ # debug5
305
+ # debug4
306
+ # debug3
307
+ # debug2
308
+ # debug1
309
+ # info
310
+ # notice
311
+ # warning
312
+ # error
313
+ # log
314
+ # fatal
315
+ # panic (effectively off)
316
+
317
+ #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
318
+ # and their durations, > 0 logs only
319
+ # statements running at least this number
320
+ # of milliseconds
321
+
322
+
323
+ # - What to Log -
324
+
325
+ #debug_print_parse = off
326
+ #debug_print_rewritten = off
327
+ #debug_print_plan = off
328
+ #debug_pretty_print = on
329
+ #log_checkpoints = off
330
+ #log_connections = off
331
+ #log_disconnections = off
332
+ #log_duration = off
333
+ #log_hostname = off
334
+ #log_line_prefix = '' # special values:
335
+ # %u = user name
336
+ # %d = database name
337
+ # %r = remote host and port
338
+ # %h = remote host
339
+ # %p = process ID
340
+ # %t = timestamp without milliseconds
341
+ # %m = timestamp with milliseconds
342
+ # %i = command tag
343
+ # %c = session ID
344
+ # %l = session line number
345
+ # %s = session start timestamp
346
+ # %v = virtual transaction ID
347
+ # %x = transaction ID (0 if none)
348
+ # %q = stop here in non-session
349
+ # processes
350
+ # %% = '%'
351
+ # e.g. '<%u%%%d> '
352
+ #log_lock_waits = off # log lock waits >= deadlock_timeout
353
+ #log_statement = 'none' # none, ddl, mod, all
354
+ #log_temp_files = -1 # log temporary files equal or larger
355
+ # than the specified size in kilobytes;
356
+ # -1 disables, 0 logs all temp files
357
+ #log_timezone = unknown # actually, defaults to TZ environment
358
+ # setting
359
+
360
+
361
+ #------------------------------------------------------------------------------
362
+ # RUNTIME STATISTICS
363
+ #------------------------------------------------------------------------------
364
+
365
+ # - Query/Index Statistics Collector -
366
+
367
+ #track_activities = on
368
+ #track_counts = on
369
+ #track_functions = none # none, pl, all
370
+ #track_activity_query_size = 1024
371
+ #update_process_title = on
372
+ #stats_temp_directory = 'pg_stat_tmp'
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 this number
392
+ # of milliseconds.
393
+ #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
394
+ #autovacuum_naptime = 1min # time between autovacuum runs
395
+ #autovacuum_vacuum_threshold = 50 # min number of row updates before
396
+ # vacuum
397
+ #autovacuum_analyze_threshold = 50 # min number of row updates before
398
+ # analyze
399
+ #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
400
+ #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
401
+ #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
402
+ # (change requires restart)
403
+ #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
404
+ # autovacuum, in milliseconds;
405
+ # -1 means use vacuum_cost_delay
406
+ #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
407
+ # autovacuum, -1 means use
408
+ # vacuum_cost_limit
409
+
410
+
411
+ #------------------------------------------------------------------------------
412
+ # CLIENT CONNECTION DEFAULTS
413
+ #------------------------------------------------------------------------------
414
+
415
+ # - Statement Behavior -
416
+
417
+ #search_path = '"$user",public' # schema names
418
+ #default_tablespace = '' # a tablespace name, '' uses the default
419
+ #temp_tablespaces = '' # a list of tablespace names, '' uses
420
+ # only default tablespace
421
+ #check_function_bodies = on
422
+ #default_transaction_isolation = 'read committed'
423
+ #default_transaction_read_only = off
424
+ #session_replication_role = 'origin'
425
+ #statement_timeout = 0 # in milliseconds, 0 is disabled
426
+ #vacuum_freeze_min_age = 50000000
427
+ #vacuum_freeze_table_age = 150000000
428
+ #xmlbinary = 'base64'
429
+ #xmloption = 'content'
430
+
431
+ # - Locale and Formatting -
432
+
433
+ datestyle = 'iso, mdy'
434
+ #intervalstyle = 'postgres'
435
+ #timezone = unknown # actually, defaults to TZ environment
436
+ # setting
437
+ #timezone_abbreviations = 'Default' # Select the set of available time zone
438
+ # abbreviations. Currently, there are
439
+ # Default
440
+ # Australia
441
+ # India
442
+ # You can create your own file in
443
+ # share/timezonesets/.
444
+ #extra_float_digits = 0 # min -15, max 2
445
+ #client_encoding = sql_ascii # actually, defaults to database
446
+ # encoding
447
+
448
+ # These settings are initialized by initdb, but they can be changed.
449
+ lc_messages = 'en_US.UTF-8' # locale for system error message
450
+ # strings
451
+ lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
452
+ lc_numeric = 'en_US.UTF-8' # locale for number formatting
453
+ lc_time = 'en_US.UTF-8' # locale for time formatting
454
+
455
+ # default configuration for text search
456
+ default_text_search_config = 'pg_catalog.english'
457
+
458
+ # - Other Defaults -
459
+
460
+ #dynamic_library_path = '$libdir'
461
+ #local_preload_libraries = ''
462
+
463
+
464
+ #------------------------------------------------------------------------------
465
+ # LOCK MANAGEMENT
466
+ #------------------------------------------------------------------------------
467
+
468
+ #deadlock_timeout = 1s
469
+ #max_locks_per_transaction = 64 # min 10
470
+ # (change requires restart)
471
+ # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
472
+ # max_locks_per_transaction * (max_connections + max_prepared_transactions)
473
+ # lock table slots.
474
+
475
+
476
+ #------------------------------------------------------------------------------
477
+ # VERSION/PLATFORM COMPATIBILITY
478
+ #------------------------------------------------------------------------------
479
+
480
+ # - Previous PostgreSQL Versions -
481
+
482
+ #add_missing_from = off
483
+ #array_nulls = on
484
+ #backslash_quote = safe_encoding # on, off, or safe_encoding
485
+ #default_with_oids = off
486
+ #escape_string_warning = on
487
+ #regex_flavor = advanced # advanced, extended, or basic
488
+ #sql_inheritance = on
489
+ #standard_conforming_strings = off
490
+ #synchronize_seqscans = on
491
+
492
+ # - Other Platforms and Clients -
493
+
494
+ #transform_null_equals = off
495
+
496
+
497
+ #------------------------------------------------------------------------------
498
+ # CUSTOMIZED OPTIONS
499
+ #------------------------------------------------------------------------------
500
+
501
+ #custom_variable_classes = '' # list of custom variable class names