server_maint 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/lib/cookbooks/postgresql/.gitignore +7 -0
- data/lib/cookbooks/postgresql/.ruby-version +1 -0
- data/lib/cookbooks/postgresql/LICENSE.txt +20 -0
- data/lib/cookbooks/postgresql/README.md +588 -0
- data/lib/cookbooks/postgresql/Rakefile +35 -0
- data/lib/cookbooks/postgresql/attributes/default.rb +365 -0
- data/lib/cookbooks/postgresql/definitions/pg_database.rb +61 -0
- data/lib/cookbooks/postgresql/definitions/pg_database_extensions.rb +67 -0
- data/lib/cookbooks/postgresql/definitions/pg_user.rb +45 -0
- data/lib/cookbooks/postgresql/files/default/pgdg.pref +3 -0
- data/lib/cookbooks/postgresql/metadata.rb +22 -0
- data/lib/cookbooks/postgresql/recipes/client.rb +8 -0
- data/lib/cookbooks/postgresql/recipes/contrib.rb +8 -0
- data/lib/cookbooks/postgresql/recipes/dbg.rb +8 -0
- data/lib/cookbooks/postgresql/recipes/default.rb +50 -0
- data/lib/cookbooks/postgresql/recipes/doc.rb +8 -0
- data/lib/cookbooks/postgresql/recipes/libpq.rb +9 -0
- data/lib/cookbooks/postgresql/recipes/postgis.rb +8 -0
- data/lib/cookbooks/postgresql/recipes/server.rb +118 -0
- data/lib/cookbooks/postgresql/templates/default/environment.erb +11 -0
- data/lib/cookbooks/postgresql/templates/default/pg_ctl.conf.erb +5 -0
- data/lib/cookbooks/postgresql/templates/default/pg_hba.conf.erb +100 -0
- data/lib/cookbooks/postgresql/templates/default/pg_ident.conf.erb +46 -0
- data/lib/cookbooks/postgresql/templates/default/postgresql.conf.custom.erb +10 -0
- data/lib/cookbooks/postgresql/templates/default/postgresql.conf.standard.erb +558 -0
- data/lib/cookbooks/postgresql/templates/default/start.conf.erb +9 -0
- data/lib/cookbooks/postgresql/test/.chef/knife.rb +2 -0
- data/lib/cookbooks/postgresql/test/support/Gemfile +5 -0
- data/lib/server_maint/version.rb +1 -1
- metadata +32 -4
@@ -0,0 +1,46 @@
|
|
1
|
+
# PostgreSQL User Name Maps
|
2
|
+
# =========================
|
3
|
+
#
|
4
|
+
# Refer to the PostgreSQL documentation, chapter "Client
|
5
|
+
# Authentication" for a complete description. A short synopsis
|
6
|
+
# follows.
|
7
|
+
#
|
8
|
+
# This file controls PostgreSQL user name mapping. It maps external
|
9
|
+
# user names to their corresponding PostgreSQL user names. Records
|
10
|
+
# are of the form:
|
11
|
+
#
|
12
|
+
# MAPNAME SYSTEM-USERNAME PG-USERNAME
|
13
|
+
#
|
14
|
+
# (The uppercase quantities must be replaced by actual values.)
|
15
|
+
#
|
16
|
+
# MAPNAME is the (otherwise freely chosen) map name that was used in
|
17
|
+
# pg_hba.conf. SYSTEM-USERNAME is the detected user name of the
|
18
|
+
# client. PG-USERNAME is the requested PostgreSQL user name. The
|
19
|
+
# existence of a record specifies that SYSTEM-USERNAME may connect as
|
20
|
+
# PG-USERNAME.
|
21
|
+
#
|
22
|
+
# If SYSTEM-USERNAME starts with a slash (/), it will be treated as a
|
23
|
+
# regular expression. Optionally this can contain a capture (a
|
24
|
+
# parenthesized subexpression). The substring matching the capture
|
25
|
+
# will be substituted for \1 (backslash-one) if present in
|
26
|
+
# PG-USERNAME.
|
27
|
+
#
|
28
|
+
# Multiple maps may be specified in this file and used by pg_hba.conf.
|
29
|
+
#
|
30
|
+
# No map names are defined in the default configuration. If all
|
31
|
+
# system user names and PostgreSQL user names are the same, you don't
|
32
|
+
# need anything in this file.
|
33
|
+
#
|
34
|
+
# This file is read on server startup and when the postmaster receives
|
35
|
+
# a SIGHUP signal. If you edit the file on a running system, you have
|
36
|
+
# to SIGHUP the postmaster for the changes to take effect. You can
|
37
|
+
# use "pg_ctl reload" to do that.
|
38
|
+
|
39
|
+
# Put your actual configuration here
|
40
|
+
# ----------------------------------
|
41
|
+
|
42
|
+
# MAPNAME SYSTEM-USERNAME PG-USERNAME
|
43
|
+
|
44
|
+
<% node["postgresql"]["pg_ident"].each do |ident| %>
|
45
|
+
<%= ident %>
|
46
|
+
<% end %>
|
@@ -0,0 +1,558 @@
|
|
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 = '<%= node["postgresql"]["data_directory"] %>' # use data in another directory
|
42
|
+
# (change requires restart)
|
43
|
+
hba_file = '<%= node["postgresql"]["hba_file"] %>' # host-based authentication file
|
44
|
+
# (change requires restart)
|
45
|
+
ident_file = '<%= node["postgresql"]["ident_file"] %>' # 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 = '<%= node["postgresql"]["external_pid_file"] %>' # 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 = '<%= node["postgresql"]["listen_addresses"] %>' # what IP address(es) to listen on;
|
60
|
+
# comma-separated list of addresses;
|
61
|
+
# defaults to 'localhost', '*' = all
|
62
|
+
# (change requires restart)
|
63
|
+
port = <%= node["postgresql"]["port"] %> # (change requires restart)
|
64
|
+
max_connections = <%= node["postgresql"]["max_connections"] %> # (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 = <%= node["postgresql"]["superuser_reserved_connections"] %> # (change requires restart)
|
68
|
+
unix_socket_directory = '<%= node["postgresql"]["unix_socket_directory"] %>' # (change requires restart)
|
69
|
+
#unix_socket_group = '<%= node["postgresql"]["unix_socket_group"] %>' # (change requires restart)
|
70
|
+
#unix_socket_permissions = <%= node["postgresql"]["unix_socket_permissions"] %> # begin with 0 to use octal notation
|
71
|
+
# (change requires restart)
|
72
|
+
#bonjour = <%= node["postgresql"]["bonjour"] %> # advertise server via Bonjour
|
73
|
+
# (change requires restart)
|
74
|
+
#bonjour_name = '<%= node["postgresql"]["bonjour_name"] %>' # defaults to the computer name
|
75
|
+
# (change requires restart)
|
76
|
+
|
77
|
+
# - Security and Authentication -
|
78
|
+
|
79
|
+
#authentication_timeout = <%= node["postgresql"]["authentication_timeout"] %> # 1s-600s
|
80
|
+
ssl = <%= node["postgresql"]["ssl"] %> # (change requires restart)
|
81
|
+
#ssl_ciphers = '<%= node["postgresql"]["ssl_ciphers"] %>' # allowed SSL ciphers
|
82
|
+
# (change requires restart)
|
83
|
+
#ssl_renegotiation_limit = <%= node["postgresql"]["ssl_renegotiation_limit"] %> # amount of data between renegotiations
|
84
|
+
ssl_cert_file = '<%= node["postgresql"]["ssl_cert_file"] %>' # (change requires restart)
|
85
|
+
ssl_key_file = '<%= node["postgresql"]["ssl_key_file"] %>' # (change requires restart)
|
86
|
+
#password_encryption = <%= node["postgresql"]["password_encryption"] %>
|
87
|
+
#db_user_namespace = <%= node["postgresql"]["db_user_namespace"] %>
|
88
|
+
|
89
|
+
# Kerberos and GSSAPI
|
90
|
+
#krb_server_keyfile = '<%= node["postgresql"]["krb_server_keyfile"] %>'
|
91
|
+
#krb_srvname = '<%= node["postgresql"]["krb_srvname"] %>' # (Kerberos only)
|
92
|
+
#krb_caseins_users = <%= node["postgresql"]["krb_caseins_users"] %>
|
93
|
+
|
94
|
+
# - TCP Keepalives -
|
95
|
+
# see "man 7 tcp" for details
|
96
|
+
|
97
|
+
#tcp_keepalives_idle = <%= node["postgresql"]["tcp_keepalives_idle"] %> # TCP_KEEPIDLE, in seconds;
|
98
|
+
# 0 selects the system default
|
99
|
+
#tcp_keepalives_interval = <%= node["postgresql"]["tcp_keepalives_interval"] %> # TCP_KEEPINTVL, in seconds;
|
100
|
+
# 0 selects the system default
|
101
|
+
#tcp_keepalives_count = <%= node["postgresql"]["tcp_keepalives_count"] %> # TCP_KEEPCNT;
|
102
|
+
# 0 selects the system default
|
103
|
+
|
104
|
+
|
105
|
+
#------------------------------------------------------------------------------
|
106
|
+
# RESOURCE USAGE (except WAL)
|
107
|
+
#------------------------------------------------------------------------------
|
108
|
+
|
109
|
+
# - Memory -
|
110
|
+
|
111
|
+
shared_buffers = <%= node["postgresql"]["shared_buffers"] %> # min 128kB
|
112
|
+
# (change requires restart)
|
113
|
+
#temp_buffers = <%= node["postgresql"]["temp_buffers"] %> # min 800kB
|
114
|
+
#max_prepared_transactions = <%= node["postgresql"]["max_prepared_transactions"] %> # zero disables the feature
|
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
|
+
# It is not advisable to set max_prepared_transactions nonzero unless you
|
119
|
+
# actively intend to use prepared transactions.
|
120
|
+
#work_mem = <%= node["postgresql"]["work_mem"] %> # min 64kB
|
121
|
+
#maintenance_work_mem = <%= node["postgresql"]["maintenance_work_mem"] %> # min 1MB
|
122
|
+
#max_stack_depth = <%= node["postgresql"]["max_stack_depth"] %> # min 100kB
|
123
|
+
|
124
|
+
# - Kernel Resource Usage -
|
125
|
+
|
126
|
+
#max_files_per_process = <%= node["postgresql"]["max_files_per_process"] %> # min 25
|
127
|
+
# (change requires restart)
|
128
|
+
#shared_preload_libraries = '<%= node["postgresql"]["shared_preload_libraries"] %>' # (change requires restart)
|
129
|
+
|
130
|
+
# - Cost-Based Vacuum Delay -
|
131
|
+
|
132
|
+
#vacuum_cost_delay = <%= node["postgresql"]["vacuum_cost_delay"] %> # 0-100 milliseconds
|
133
|
+
#vacuum_cost_page_hit = <%= node["postgresql"]["vacuum_cost_page_hit"] %> # 0-10000 credits
|
134
|
+
#vacuum_cost_page_miss = <%= node["postgresql"]["vacuum_cost_page_miss"] %> # 0-10000 credits
|
135
|
+
#vacuum_cost_page_dirty = <%= node["postgresql"]["vacuum_cost_page_dirty"] %> # 0-10000 credits
|
136
|
+
#vacuum_cost_limit = <%= node["postgresql"]["vacuum_cost_limit"] %> # 1-10000 credits
|
137
|
+
|
138
|
+
# - Background Writer -
|
139
|
+
|
140
|
+
#bgwriter_delay = <%= node["postgresql"]["bgwriter_delay"] %> # 10-10000ms between rounds
|
141
|
+
#bgwriter_lru_maxpages = <%= node["postgresql"]["bgwriter_lru_maxpages"] %> # 0-1000 max buffers written/round
|
142
|
+
#bgwriter_lru_multiplier = <%= node["postgresql"]["bgwriter_lru_multiplier"] %> # 0-10.0 multipler on buffers scanned/round
|
143
|
+
|
144
|
+
# - Asynchronous Behavior -
|
145
|
+
|
146
|
+
#effective_io_concurrency = <%= node["postgresql"]["effective_io_concurrency"] %> # 1-1000. 0 disables prefetching
|
147
|
+
|
148
|
+
|
149
|
+
#------------------------------------------------------------------------------
|
150
|
+
# WRITE AHEAD LOG
|
151
|
+
#------------------------------------------------------------------------------
|
152
|
+
|
153
|
+
# - Settings -
|
154
|
+
|
155
|
+
#wal_level = <%= node["postgresql"]["wal_level"] %> # minimal, archive, or hot_standby
|
156
|
+
# (change requires restart)
|
157
|
+
#fsync = <%= node["postgresql"]["fsync"] %> # turns forced synchronization on or off
|
158
|
+
#synchronous_commit = <%= node["postgresql"]["synchronous_commit"] %> # synchronization level; on, off, or local
|
159
|
+
#wal_sync_method = <%= node["postgresql"]["wal_sync_method"] %> # the default is the first option
|
160
|
+
# supported by the operating system:
|
161
|
+
# open_datasync
|
162
|
+
# fdatasync (default on Linux)
|
163
|
+
# fsync
|
164
|
+
# fsync_writethrough
|
165
|
+
# open_sync
|
166
|
+
#full_page_writes = <%= node["postgresql"]["full_page_writes"] %> # recover from partial page writes
|
167
|
+
#wal_buffers = <%= node["postgresql"]["wal_buffers"] %> # min 32kB, -1 sets based on shared_buffers
|
168
|
+
# (change requires restart)
|
169
|
+
#wal_writer_delay = <%= node["postgresql"]["wal_writer_delay"] %> # 1-10000 milliseconds
|
170
|
+
|
171
|
+
#commit_delay = <%= node["postgresql"]["commit_delay"] %> # range 0-100000, in microseconds
|
172
|
+
#commit_siblings = <%= node["postgresql"]["commit_siblings"] %> # range 1-1000
|
173
|
+
|
174
|
+
# - Checkpoints -
|
175
|
+
|
176
|
+
#checkpoint_segments = <%= node["postgresql"]["checkpoint_segments"] %> # in logfile segments, min 1, 16MB each
|
177
|
+
#checkpoint_timeout = <%= node["postgresql"]["checkpoint_timeout"] %> # range 30s-1h
|
178
|
+
#checkpoint_completion_target = <%= node["postgresql"]["checkpoint_completion_target"] %> # checkpoint target duration, 0.0 - 1.0
|
179
|
+
#checkpoint_warning = <%= node["postgresql"]["checkpoint_warning"] %> # 0 disables
|
180
|
+
|
181
|
+
# - Archiving -
|
182
|
+
|
183
|
+
#archive_mode = <%= node["postgresql"]["archive_mode"] %> # allows archiving to be done
|
184
|
+
# (change requires restart)
|
185
|
+
#archive_command = '<%= node["postgresql"]["archive_command"] %>' # command to use to archive a logfile segment
|
186
|
+
#archive_timeout = <%= node["postgresql"]["archive_timeout"] %> # force a logfile segment switch after this
|
187
|
+
# number of seconds; 0 disables
|
188
|
+
|
189
|
+
|
190
|
+
#------------------------------------------------------------------------------
|
191
|
+
# REPLICATION
|
192
|
+
#------------------------------------------------------------------------------
|
193
|
+
|
194
|
+
# - Master Server -
|
195
|
+
|
196
|
+
# These settings are ignored on a standby server
|
197
|
+
|
198
|
+
#max_wal_senders = <%= node["postgresql"]["max_wal_senders"] %> # max number of walsender processes
|
199
|
+
# (change requires restart)
|
200
|
+
#wal_sender_delay = <%= node["postgresql"]["wal_sender_delay"] %> # walsender cycle time, 1-10000 milliseconds
|
201
|
+
#wal_keep_segments = <%= node["postgresql"]["wal_keep_segments"] %> # in logfile segments, 16MB each; 0 disables
|
202
|
+
#vacuum_defer_cleanup_age = <%= node["postgresql"]["vacuum_defer_cleanup_age"] %> # number of xacts by which cleanup is delayed
|
203
|
+
#replication_timeout = <%= node["postgresql"]["replication_timeout"] %> # in milliseconds; 0 disables
|
204
|
+
#synchronous_standby_names = '<%= node["postgresql"]["synchronous_standby_names"] %>' # standby servers that provide sync rep
|
205
|
+
# comma-separated list of application_name
|
206
|
+
# from standby(s); '*' = all
|
207
|
+
|
208
|
+
# - Standby Servers -
|
209
|
+
|
210
|
+
# These settings are ignored on a master server
|
211
|
+
|
212
|
+
#hot_standby = <%= node["postgresql"]["hot_standby"] %> # "on" allows queries during recovery
|
213
|
+
# (change requires restart)
|
214
|
+
#max_standby_archive_delay = <%= node["postgresql"]["max_standby_archive_delay"] %> # max delay before canceling queries
|
215
|
+
# when reading WAL from archive;
|
216
|
+
# -1 allows indefinite delay
|
217
|
+
#max_standby_streaming_delay = <%= node["postgresql"]["max_standby_streaming_delay"] %> # max delay before canceling queries
|
218
|
+
# when reading streaming WAL;
|
219
|
+
# -1 allows indefinite delay
|
220
|
+
#wal_receiver_status_interval = <%= node["postgresql"]["wal_receiver_status_interval"] %> # send replies at least this often
|
221
|
+
# 0 disables
|
222
|
+
#hot_standby_feedback = <%= node["postgresql"]["hot_standby_feedback"] %> # send info from standby to prevent
|
223
|
+
# query conflicts
|
224
|
+
|
225
|
+
|
226
|
+
#------------------------------------------------------------------------------
|
227
|
+
# QUERY TUNING
|
228
|
+
#------------------------------------------------------------------------------
|
229
|
+
|
230
|
+
# - Planner Method Configuration -
|
231
|
+
|
232
|
+
#enable_bitmapscan = <%= node["postgresql"]["enable_bitmapscan"] %>
|
233
|
+
#enable_hashagg = <%= node["postgresql"]["enable_hashagg"] %>
|
234
|
+
#enable_hashjoin = <%= node["postgresql"]["enable_hashjoin"] %>
|
235
|
+
#enable_indexscan = <%= node["postgresql"]["enable_indexscan"] %>
|
236
|
+
#enable_material = <%= node["postgresql"]["enable_material"] %>
|
237
|
+
#enable_mergejoin = <%= node["postgresql"]["enable_mergejoin"] %>
|
238
|
+
#enable_nestloop = <%= node["postgresql"]["enable_nestloop"] %>
|
239
|
+
#enable_seqscan = <%= node["postgresql"]["enable_seqscan"] %>
|
240
|
+
#enable_sort = <%= node["postgresql"]["enable_sort"] %>
|
241
|
+
#enable_tidscan = <%= node["postgresql"]["enable_tidscan"] %>
|
242
|
+
|
243
|
+
# - Planner Cost Constants -
|
244
|
+
|
245
|
+
#seq_page_cost = <%= node["postgresql"]["seq_page_cost"] %> # measured on an arbitrary scale
|
246
|
+
#random_page_cost = <%= node["postgresql"]["random_page_cost"] %> # same scale as above
|
247
|
+
#cpu_tuple_cost = <%= node["postgresql"]["cpu_tuple_cost"] %> # same scale as above
|
248
|
+
#cpu_index_tuple_cost = <%= node["postgresql"]["cpu_index_tuple_cost"] %> # same scale as above
|
249
|
+
#cpu_operator_cost = <%= node["postgresql"]["cpu_operator_cost"] %> # same scale as above
|
250
|
+
#effective_cache_size = <%= node["postgresql"]["effective_cache_size"] %>
|
251
|
+
|
252
|
+
# - Genetic Query Optimizer -
|
253
|
+
|
254
|
+
#geqo = <%= node["postgresql"]["geqo"] %>
|
255
|
+
#geqo_threshold = <%= node["postgresql"]["geqo_threshold"] %>
|
256
|
+
#geqo_effort = <%= node["postgresql"]["geqo_effort"] %> # range 1-10
|
257
|
+
#geqo_pool_size = <%= node["postgresql"]["geqo_pool_size"] %> # selects default based on effort
|
258
|
+
#geqo_generations = <%= node["postgresql"]["geqo_generations"] %> # selects default based on effort
|
259
|
+
#geqo_selection_bias = <%= node["postgresql"]["geqo_selection_bias"] %> # range 1.5-2.0
|
260
|
+
#geqo_seed = <%= node["postgresql"]["geqo_seed"] %> # range 0.0-1.0
|
261
|
+
|
262
|
+
# - Other Planner Options -
|
263
|
+
|
264
|
+
#default_statistics_target = <%= node["postgresql"]["default_statistics_target"] %> # range 1-10000
|
265
|
+
#constraint_exclusion = <%= node["postgresql"]["constraint_exclusion"] %> # on, off, or partition
|
266
|
+
#cursor_tuple_fraction = <%= node["postgresql"]["cursor_tuple_fraction"] %> # range 0.0-1.0
|
267
|
+
#from_collapse_limit = <%= node["postgresql"]["from_collapse_limit"] %>
|
268
|
+
#join_collapse_limit = <%= node["postgresql"]["join_collapse_limit"] %> # 1 disables collapsing of explicit
|
269
|
+
# JOIN clauses
|
270
|
+
|
271
|
+
|
272
|
+
#------------------------------------------------------------------------------
|
273
|
+
# ERROR REPORTING AND LOGGING
|
274
|
+
#------------------------------------------------------------------------------
|
275
|
+
|
276
|
+
# - Where to Log -
|
277
|
+
|
278
|
+
#log_destination = '<%= node["postgresql"]["log_destination"] %>' # Valid values are combinations of
|
279
|
+
# stderr, csvlog, syslog, and eventlog,
|
280
|
+
# depending on platform. csvlog
|
281
|
+
# requires logging_collector to be on.
|
282
|
+
|
283
|
+
# This is used when logging to stderr:
|
284
|
+
#logging_collector = <%= node["postgresql"]["logging_collector"] %> # Enable capturing of stderr and csvlog
|
285
|
+
# into log files. Required to be on for
|
286
|
+
# csvlogs.
|
287
|
+
# (change requires restart)
|
288
|
+
|
289
|
+
# These are only used if logging_collector is on:
|
290
|
+
#log_directory = '<%= node["postgresql"]["log_directory"] %>' # directory where log files are written,
|
291
|
+
# can be absolute or relative to PGDATA
|
292
|
+
#log_filename = '<%= node["postgresql"]["log_filename"] %>' # log file name pattern,
|
293
|
+
# can include strftime() escapes
|
294
|
+
#log_file_mode = <%= node["postgresql"]["log_file_mode"] %> # creation mode for log files,
|
295
|
+
# begin with 0 to use octal notation
|
296
|
+
#log_truncate_on_rotation = <%= node["postgresql"]["log_truncate_on_rotation"] %> # If on, an existing log file with the
|
297
|
+
# same name as the new log file will be
|
298
|
+
# truncated rather than appended to.
|
299
|
+
# But such truncation only occurs on
|
300
|
+
# time-driven rotation, not on restarts
|
301
|
+
# or size-driven rotation. Default is
|
302
|
+
# off, meaning append to existing files
|
303
|
+
# in all cases.
|
304
|
+
#log_rotation_age = <%= node["postgresql"]["log_rotation_age"] %> # Automatic rotation of logfiles will
|
305
|
+
# happen after that time. 0 disables.
|
306
|
+
#log_rotation_size = <%= node["postgresql"]["log_rotation_size"] %> # Automatic rotation of logfiles will
|
307
|
+
# happen after that much log output.
|
308
|
+
# 0 disables.
|
309
|
+
|
310
|
+
# These are relevant when logging to syslog:
|
311
|
+
#syslog_facility = '<%= node["postgresql"]["syslog_facility"] %>'
|
312
|
+
#syslog_ident = '<%= node["postgresql"]["syslog_ident"] %>'
|
313
|
+
|
314
|
+
#silent_mode = <%= node["postgresql"]["silent_mode"] %> # Run server silently.
|
315
|
+
# DO NOT USE without syslog or
|
316
|
+
# logging_collector
|
317
|
+
# (change requires restart)
|
318
|
+
|
319
|
+
|
320
|
+
# - When to Log -
|
321
|
+
|
322
|
+
#client_min_messages = <%= node["postgresql"]["client_min_messages"] %> # values in order of decreasing detail:
|
323
|
+
# debug5
|
324
|
+
# debug4
|
325
|
+
# debug3
|
326
|
+
# debug2
|
327
|
+
# debug1
|
328
|
+
# log
|
329
|
+
# notice
|
330
|
+
# warning
|
331
|
+
# error
|
332
|
+
|
333
|
+
#log_min_messages = <%= node["postgresql"]["log_min_messages"] %> # values in order of decreasing detail:
|
334
|
+
# debug5
|
335
|
+
# debug4
|
336
|
+
# debug3
|
337
|
+
# debug2
|
338
|
+
# debug1
|
339
|
+
# info
|
340
|
+
# notice
|
341
|
+
# warning
|
342
|
+
# error
|
343
|
+
# log
|
344
|
+
# fatal
|
345
|
+
# panic
|
346
|
+
|
347
|
+
#log_min_error_statement = <%= node["postgresql"]["log_min_error_statement"] %> # values in order of decreasing detail:
|
348
|
+
# debug5
|
349
|
+
# debug4
|
350
|
+
# debug3
|
351
|
+
# debug2
|
352
|
+
# debug1
|
353
|
+
# info
|
354
|
+
# notice
|
355
|
+
# warning
|
356
|
+
# error
|
357
|
+
# log
|
358
|
+
# fatal
|
359
|
+
# panic (effectively off)
|
360
|
+
|
361
|
+
#log_min_duration_statement = <%= node["postgresql"]["log_min_duration_statement"] %> # -1 is disabled, 0 logs all statements
|
362
|
+
# and their durations, > 0 logs only
|
363
|
+
# statements running at least this number
|
364
|
+
# of milliseconds
|
365
|
+
|
366
|
+
|
367
|
+
# - What to Log -
|
368
|
+
|
369
|
+
#debug_print_parse = <%= node["postgresql"]["debug_print_parse"] %>
|
370
|
+
#debug_print_rewritten = <%= node["postgresql"]["debug_print_rewritten"] %>
|
371
|
+
#debug_print_plan = <%= node["postgresql"]["debug_print_plan"] %>
|
372
|
+
#debug_pretty_print = <%= node["postgresql"]["debug_pretty_print"] %>
|
373
|
+
#log_checkpoints = <%= node["postgresql"]["log_checkpoints"] %>
|
374
|
+
#log_connections = <%= node["postgresql"]["log_connections"] %>
|
375
|
+
#log_disconnections = <%= node["postgresql"]["log_disconnections"] %>
|
376
|
+
#log_duration = <%= node["postgresql"]["log_duration"] %>
|
377
|
+
#log_error_verbosity = <%= node["postgresql"]["log_error_verbosity"] %> # terse, default, or verbose messages
|
378
|
+
#log_hostname = <%= node["postgresql"]["log_hostname"] %>
|
379
|
+
log_line_prefix = '<%= node["postgresql"]["log_line_prefix"] %>' # special values:
|
380
|
+
# %a = application name
|
381
|
+
# %u = user name
|
382
|
+
# %d = database name
|
383
|
+
# %r = remote host and port
|
384
|
+
# %h = remote host
|
385
|
+
# %p = process ID
|
386
|
+
# %t = timestamp without milliseconds
|
387
|
+
# %m = timestamp with milliseconds
|
388
|
+
# %i = command tag
|
389
|
+
# %e = SQL state
|
390
|
+
# %c = session ID
|
391
|
+
# %l = session line number
|
392
|
+
# %s = session start timestamp
|
393
|
+
# %v = virtual transaction ID
|
394
|
+
# %x = transaction ID (0 if none)
|
395
|
+
# %q = stop here in non-session
|
396
|
+
# processes
|
397
|
+
# %% = '%'
|
398
|
+
# e.g. '[%u%%%d] '
|
399
|
+
#log_lock_waits = <%= node["postgresql"]["log_lock_waits"] %> # log lock waits >= deadlock_timeout
|
400
|
+
#log_statement = '<%= node["postgresql"]["log_statement"] %>' # none, ddl, mod, all
|
401
|
+
#log_temp_files = <%= node["postgresql"]["log_temp_files"] %> # log temporary files equal or larger
|
402
|
+
# than the specified size in kilobytes;
|
403
|
+
# -1 disables, 0 logs all temp files
|
404
|
+
#log_timezone = '<%= node["postgresql"]["log_timezone"] %>'
|
405
|
+
|
406
|
+
|
407
|
+
#------------------------------------------------------------------------------
|
408
|
+
# RUNTIME STATISTICS
|
409
|
+
#------------------------------------------------------------------------------
|
410
|
+
|
411
|
+
# - Query/Index Statistics Collector -
|
412
|
+
|
413
|
+
#track_activities = <%= node["postgresql"]["track_activities"] %>
|
414
|
+
#track_counts = <%= node["postgresql"]["track_counts"] %>
|
415
|
+
#track_functions = <%= node["postgresql"]["track_functions"] %> # none, pl, all
|
416
|
+
#track_activity_query_size = <%= node["postgresql"]["track_activity_query_size"] %> # (change requires restart)
|
417
|
+
#update_process_title = <%= node["postgresql"]["update_process_title"] %>
|
418
|
+
#stats_temp_directory = '<%= node["postgresql"]["stats_temp_directory"] %>'
|
419
|
+
|
420
|
+
|
421
|
+
# - Statistics Monitoring -
|
422
|
+
|
423
|
+
#log_parser_stats = <%= node["postgresql"]["log_parser_stats"] %>
|
424
|
+
#log_planner_stats = <%= node["postgresql"]["log_planner_stats"] %>
|
425
|
+
#log_executor_stats = <%= node["postgresql"]["log_executor_stats"] %>
|
426
|
+
#log_statement_stats = <%= node["postgresql"]["log_statement_stats"] %>
|
427
|
+
|
428
|
+
|
429
|
+
#------------------------------------------------------------------------------
|
430
|
+
# AUTOVACUUM PARAMETERS
|
431
|
+
#------------------------------------------------------------------------------
|
432
|
+
|
433
|
+
#autovacuum = <%= node["postgresql"]["autovacuum"] %> # Enable autovacuum subprocess? 'on'
|
434
|
+
# requires track_counts to also be on.
|
435
|
+
#log_autovacuum_min_duration = <%= node["postgresql"]["log_autovacuum_min_duration"] %> # -1 disables, 0 logs all actions and
|
436
|
+
# their durations, > 0 logs only
|
437
|
+
# actions running at least this number
|
438
|
+
# of milliseconds.
|
439
|
+
#autovacuum_max_workers = <%= node["postgresql"]["autovacuum_max_workers"] %> # max number of autovacuum subprocesses
|
440
|
+
# (change requires restart)
|
441
|
+
#autovacuum_naptime = <%= node["postgresql"]["autovacuum_naptime"] %> # time between autovacuum runs
|
442
|
+
#autovacuum_vacuum_threshold = <%= node["postgresql"]["autovacuum_vacuum_threshold"] %> # min number of row updates before
|
443
|
+
# vacuum
|
444
|
+
#autovacuum_analyze_threshold = <%= node["postgresql"]["autovacuum_analyze_threshold"] %> # min number of row updates before
|
445
|
+
# analyze
|
446
|
+
#autovacuum_vacuum_scale_factor = <%= node["postgresql"]["autovacuum_vacuum_scale_factor"] %> # fraction of table size before vacuum
|
447
|
+
#autovacuum_analyze_scale_factor = <%= node["postgresql"]["autovacuum_analyze_scale_factor"] %> # fraction of table size before analyze
|
448
|
+
#autovacuum_freeze_max_age = <%= node["postgresql"]["autovacuum_freeze_max_age"] %> # maximum XID age before forced vacuum
|
449
|
+
# (change requires restart)
|
450
|
+
#autovacuum_vacuum_cost_delay = <%= node["postgresql"]["autovacuum_vacuum_cost_delay"] %> # default vacuum cost delay for
|
451
|
+
# autovacuum, in milliseconds;
|
452
|
+
# -1 means use vacuum_cost_delay
|
453
|
+
#autovacuum_vacuum_cost_limit = <%= node["postgresql"]["autovacuum_vacuum_cost_limit"] %> # default vacuum cost limit for
|
454
|
+
# autovacuum, -1 means use
|
455
|
+
# vacuum_cost_limit
|
456
|
+
|
457
|
+
|
458
|
+
#------------------------------------------------------------------------------
|
459
|
+
# CLIENT CONNECTION DEFAULTS
|
460
|
+
#------------------------------------------------------------------------------
|
461
|
+
|
462
|
+
# - Statement Behavior -
|
463
|
+
|
464
|
+
#search_path = '<%= node["postgresql"]["search_path"] %>' # schema names
|
465
|
+
#default_tablespace = '<%= node["postgresql"]["default_tablespace"] %>' # a tablespace name, '' uses the default
|
466
|
+
#temp_tablespaces = '<%= node["postgresql"]["temp_tablespaces"] %>' # a list of tablespace names, '' uses
|
467
|
+
# only default tablespace
|
468
|
+
#check_function_bodies = <%= node["postgresql"]["check_function_bodies"] %>
|
469
|
+
#default_transaction_isolation = '<%= node["postgresql"]["default_transaction_isolation"] %>'
|
470
|
+
#default_transaction_read_only = <%= node["postgresql"]["default_transaction_read_only"] %>
|
471
|
+
#default_transaction_deferrable = <%= node["postgresql"]["default_transaction_deferrable"] %>
|
472
|
+
#session_replication_role = '<%= node["postgresql"]["session_replication_role"] %>'
|
473
|
+
#statement_timeout = <%= node["postgresql"]["statement_timeout"] %> # in milliseconds, 0 is disabled
|
474
|
+
#vacuum_freeze_min_age = <%= node["postgresql"]["vacuum_freeze_min_age"] %>
|
475
|
+
#vacuum_freeze_table_age = <%= node["postgresql"]["vacuum_freeze_table_age"] %>
|
476
|
+
#bytea_output = '<%= node["postgresql"]["bytea_output"] %>' # hex, escape
|
477
|
+
#xmlbinary = '<%= node["postgresql"]["xmlbinary"] %>'
|
478
|
+
#xmloption = '<%= node["postgresql"]["xmloption"] %>'
|
479
|
+
|
480
|
+
# - Locale and Formatting -
|
481
|
+
|
482
|
+
datestyle = '<%= node["postgresql"]["datestyle"] %>'
|
483
|
+
#intervalstyle = '<%= node["postgresql"]["intervalstyle"] %>'
|
484
|
+
#timezone = '<%= node["postgresql"]["timezone"] %>'
|
485
|
+
#timezone_abbreviations = '<%= node["postgresql"]["timezone_abbreviations"] %>' # Select the set of available time zone
|
486
|
+
# abbreviations. Currently, there are
|
487
|
+
# Default
|
488
|
+
# Australia
|
489
|
+
# India
|
490
|
+
# You can create your own file in
|
491
|
+
# share/timezonesets/.
|
492
|
+
#extra_float_digits = <%= node["postgresql"]["extra_float_digits"] %> # min -15, max 3
|
493
|
+
#client_encoding = <%= node["postgresql"]["client_encoding"] %> # actually, defaults to database
|
494
|
+
# encoding
|
495
|
+
|
496
|
+
# These settings are initialized by initdb, but they can be changed.
|
497
|
+
lc_messages = '<%= node["postgresql"]["lc_messages"] %>' # locale for system error message
|
498
|
+
# strings
|
499
|
+
lc_monetary = '<%= node["postgresql"]["lc_monetary"] %>' # locale for monetary formatting
|
500
|
+
lc_numeric = '<%= node["postgresql"]["lc_numeric"] %>' # locale for number formatting
|
501
|
+
lc_time = '<%= node["postgresql"]["lc_time"] %>' # locale for time formatting
|
502
|
+
|
503
|
+
# default configuration for text search
|
504
|
+
default_text_search_config = '<%= node["postgresql"]["default_text_search_config"] %>'
|
505
|
+
|
506
|
+
# - Other Defaults -
|
507
|
+
|
508
|
+
#dynamic_library_path = '<%= node["postgresql"]["dynamic_library_path"] %>'
|
509
|
+
#local_preload_libraries = '<%= node["postgresql"]["local_preload_libraries"] %>'
|
510
|
+
|
511
|
+
|
512
|
+
#------------------------------------------------------------------------------
|
513
|
+
# LOCK MANAGEMENT
|
514
|
+
#------------------------------------------------------------------------------
|
515
|
+
|
516
|
+
#deadlock_timeout = <%= node["postgresql"]["deadlock_timeout"] %>
|
517
|
+
#max_locks_per_transaction = <%= node["postgresql"]["max_locks_per_transaction"] %> # min 10
|
518
|
+
# (change requires restart)
|
519
|
+
# Note: Each lock table slot uses ~270 bytes of shared memory, and there are
|
520
|
+
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
|
521
|
+
# lock table slots.
|
522
|
+
#max_pred_locks_per_transaction = <%= node["postgresql"]["max_pred_locks_per_transaction"] %> # min 10
|
523
|
+
# (change requires restart)
|
524
|
+
|
525
|
+
#------------------------------------------------------------------------------
|
526
|
+
# VERSION/PLATFORM COMPATIBILITY
|
527
|
+
#------------------------------------------------------------------------------
|
528
|
+
|
529
|
+
# - Previous PostgreSQL Versions -
|
530
|
+
|
531
|
+
#array_nulls = <%= node["postgresql"]["array_nulls"] %>
|
532
|
+
#backslash_quote = <%= node["postgresql"]["backslash_quote"] %> # on, off, or safe_encoding
|
533
|
+
#default_with_oids = <%= node["postgresql"]["default_with_oids"] %>
|
534
|
+
#escape_string_warning = <%= node["postgresql"]["escape_string_warning"] %>
|
535
|
+
#lo_compat_privileges = <%= node["postgresql"]["lo_compat_privileges"] %>
|
536
|
+
#quote_all_identifiers = <%= node["postgresql"]["quote_all_identifiers"] %>
|
537
|
+
#sql_inheritance = <%= node["postgresql"]["sql_inheritance"] %>
|
538
|
+
#standard_conforming_strings = <%= node["postgresql"]["standard_conforming_strings"] %>
|
539
|
+
#synchronize_seqscans = <%= node["postgresql"]["synchronize_seqscans"] %>
|
540
|
+
|
541
|
+
# - Other Platforms and Clients -
|
542
|
+
|
543
|
+
#transform_null_equals = <%= node["postgresql"]["transform_null_equals"] %>
|
544
|
+
|
545
|
+
|
546
|
+
#------------------------------------------------------------------------------
|
547
|
+
# ERROR HANDLING
|
548
|
+
#------------------------------------------------------------------------------
|
549
|
+
|
550
|
+
#exit_on_error = <%= node["postgresql"]["exit_on_error"] %> # terminate session on any error?
|
551
|
+
#restart_after_crash = <%= node["postgresql"]["restart_after_crash"] %> # reinitialize after backend crash?
|
552
|
+
|
553
|
+
|
554
|
+
#------------------------------------------------------------------------------
|
555
|
+
# CUSTOMIZED OPTIONS
|
556
|
+
#------------------------------------------------------------------------------
|
557
|
+
|
558
|
+
#custom_variable_classes = '<%= node["postgresql"]["custom_variable_classes"] %>' # list of custom variable class names
|