~richard-asbridge/charms/precise/postgresql/postgresql-admin-ip

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
options:
  admin_addresses:
    default: ""
    type: string
    description: |
      A comma-separated list of IP Addresses (or single IP) admin tools like 
		pgAdmin3 will connect from, this is most useful for developers running 
		juju in local mode who need to connect tools like pgAdmin to a postgres. 
		The IP addresses added here will be included in the pg_hba.conf file 
		allowing ip connections to all databases on the server from the given 
		using md5 password encryption.
  locale:
    default: "C"
    type: string
    description: |
      Locale of service, defining language, default collation order,
      and default formatting of numbers, currency, dates & times. Can only be
      set when deploying the first unit of a service.
  encoding:
    default: "UTF-8"
    type: string
    description: |
      Default encoding used to store text in this service. Can only be
      set when deploying the first unit of a service.
  extra-packages:
    default: ""
    type: string
    description: Extra packages to install on the postgresql service units.
  dumpfile_location:
    default: "None"
    type: string
    description: |
        Path to a dumpfile to load into DB when service is initiated.
  config_change_command:
    default: "reload"
    type: string
    description: |
        The command to run whenever config has changed. Accepted values are
        "reload" or "restart" - any other value will mean neither is executed
        after a config change (which may be desired, if you're running a
        production server and would rather handle these out of band). Note that
        postgresql will still need to be reloaded whenever authentication and
        access details are updated, so disabling either doesn't mean PostgreSQL
        will never be reloaded.
  version:
    default: "9.1"
    type: string
    description: Version of PostgreSQL that we want to install
  cluster_name:
    default: "main"
    type: string
    description: Name of the cluster we want to install the DBs into
  listen_ip:
    default: "*"
    type: string
    description: IP to listen on
  listen_port:
    default: 5432
    type: int
    description: Port to listen on
  max_connections:
    default: 100
    type: int
    description: Maximum number of connections to allow to the PG database
  ssl:
    default: "True"
    type: string
    description: Whether PostgreSQL should talk SSL
  log_min_duration_statement:
    default: -1
    type: int
    description: |
        -1 is disabled, 0 logs all statements
        and their durations, > 0 logs only
        statements running at least this number
        of milliseconds
  log_checkpoints:
    default: False
    type: boolean
    description: Log checkpoints
  log_connections:
    default: False
    type: boolean
    description: Log connections
  log_disconnections:
    default: False
    type: boolean
    description: Log disconnections
  log_line_prefix:
    default: "%t "
    type: string
    description: |
        special values:
          %a = application name
          %u = user name
          %d = database name
          %r = remote host and port
          %h = remote host
          %p = process ID
          %t = timestamp without milliseconds
          %m = timestamp with milliseconds
          %i = command tag
          %e = SQL state
          %c = session ID
          %l = session line number
          %s = session start timestamp
          %v = virtual transaction ID
          %x = transaction ID (0 if none)
          %q = stop here in non-session processes
          %% = '%'
        e.g. '<%u%%%d> '
  log_lock_waits:
    default: False
    type: boolean
    description: log lock waits >= deadlock_timeout
  log_timezone:
    default: "UTC"
    type: string
    description: Log timezone
  autovacuum:
    default: True
    type: boolean
    description: Autovacuum should almost always be running.
  log_autovacuum_min_duration:
    default: -1
    type: int
    description: |
        -1 disables, 0 logs all actions and their durations, > 0 logs only
        actions running at least this number of milliseconds.
  autovacuum_analyze_threshold:
    default: 50
    type: int
    description: min number of row updates before analyze
  autovacuum_vacuum_scale_factor:
    default: 0.2
    type: float
    description: Fraction of table size before vacuum
  autovacuum_analyze_scale_factor:
    default: 0.1  
    type: float
    description: Fraction of table size before analyze
  autovacuum_vacuum_cost_delay:
    default: "20ms"
    type: string
    description: |
        Default vacuum cost delay for autovacuum, in milliseconds;
        -1 means use vacuum_cost_delay
  search_path:
    default: "\"$user\",public"
    type: string
    descripton: Schema names
  standard_conforming_strings:
    default: True
    type: boolean
    description: Standard conforming strings
  hot_standby:
    default: False
    type: boolean
    description: |
        Hot standby or warm standby. When True, queries can be run against
        the database is in recovery or standby mode (ie. replicated).
        Overridden by juju when master/slave relations are used.
  hot_standby_feedback:
    default: False
    type: boolean
    description: |
        Hot standby feedback, informing a master about in progress
        transactions on a streaming hot standby and allowing the master to
        defer cleanup and avoid query cancelations on the hot standby.
  wal_level:
    default: minimal
    type: string
    description: |
        'minimal', 'archive' or 'hot_standby'. Defines how much information
        is written to the WAL. Set to 'minimal' for stand alone databases
        and 'hot_standby' for replicated setups. Overridden by juju when
        replication s used.
  max_wal_senders:
    default: 0
    type: int
    description: |
        Maximum number of hot standbys that can connect using
        streaming replication. Set this to the expected maximum number of
        hot standby units to avoid unnecessary blocking and database restarts.
        Overridden by juju if necessary.
  wal_keep_segments:
    default: 0
    type: int
    description: |
        Number of old WAL files to keep, providing a larger buffer for
        streaming hot standbys to catch up from when lagged. Each WAL file
        is 16MB in size. The WAL files are the buffer of how far a
        hot standby can lag behind the master, and replication fails if
        this buffer is overrun. When this service is replicated, the larger
        value of wal_keep_segments and replicated_wal_keep_segments is used.
  replicated_wal_keep_segments:
    default: 5000
    type: int
    description: |
        Value of wal_keep_segments used when this service is replicated.
        This setting only exists to provide a sane default when replication
        is requested (so it doesn't fail) and nobody bothered to change the
        wal_keep_segments setting.
  archive_mode:
    default: False
    type: boolean
    description: |
        Enable archiving of WAL files using the command specified by
        archive_command. If archive_mode is enabled and archive_command not
        set, then archiving is deferred until archive_command is set and the
        WAL files will accumulate.
  archive_command:
    default: ""
    type: string
    description: |
        Command used to archive WAL files when archive_mode is set and
        wal_level > minimal.
  work_mem:
    default: "1MB"
    type: string
    description: Working Memory
  maintenance_work_mem:
    default: "1MB"
    type: string
    description: Maintenance working memory
  performance_tuning:
    default: "auto"
    type: string
    description: |
        Possible values here are "auto" or "manual". If we set "auto" then the
        charm will attempt to automatically tune all the performance paramaters
        as below. If manual, then it will use the defaults below unless
        overridden. "auto" gathers information about the node you're deployed
        on and tries to make intelligent guesses about what tuning parameters
        to set based on available RAM and CPU under the assumption that it's
        the only significant service running on this node.
  kernel_shmall:
    default: 0
    type: int
    description: Kernel/shmall
  kernel_shmmax:
    default: 0
    type: int
    description: Kernel/shmmax
  shared_buffers:
    default: ""
    type: string
    description: Shared buffers
  temp_buffers:
    default: "1MB"
    type: string
    description: Temp buffers
  wal_buffers:
    default: "-1"
    type: string
    description: |
        min 32kB, -1 sets based on shared_buffers (change requires restart)
  checkpoint_segments:
    default: 3
    type: int
    description: in logfile segments, min 1, 16MB each
  random_page_cost:
    default: 4.0
    type: float
    description: Random page cost
  effective_cache_size:
    default: ""
    type: string
    description: Effective cache size
  #------------------------------------------------------------------------
  # Volume management
  #   volume-map, volume-dev_regexp are only used 
  #   if volume-ephemeral-storage == False
  #------------------------------------------------------------------------
  volume-ephemeral-storage:
    type: boolean
    default: true
    description: >
      If false, a configure-error state will be raised if
         volume-map[$JUJU_UNIT_NAME] is not set (see "volume-map"
         below) - see "volume-map" below.
      If true, service units won't try to use "volume-map" (and
         related variables) to mount and use external (EBS) volumes,
         thus storage lifetime will equal VM, thus ephemeral.
         YOU'VE BEEN WARNED.
  volume-map:
    type: string
    default: ""
    description: >
      YAML map as e.g. "{ postgres/0: vol-0000010, postgres/1: vol-0000016 }".
      Service units will raise a "configure-error" condition if no volume-map
      value is set for it - it's expected a human to set it properly to resolve it.
  volume-dev-regexp:
    type: string
    default: "/dev/vd[b-z]"
    description: >
      Block device for attached volumes as seen by the VM, will be "scanned"
      for an unused device when "volume-map" is valid for the unit.
  backup_dir:
    default: "/var/lib/postgresql/backups"
    type: string
    description: Directory to place backups in
  backup_schedule:
    default: "13 4 * * *"
    type: string
    description: Cron-formatted schedule for database backups.
  backup_retention_count:
    default: 7
    type: int
    description: Number of recent backups to retain.
  nagios_context:
    default: "juju"
    type: string
    description: |
        Used by the nrpe-external-master subordinate charm.
        A string that will be prepended to instance name to set the host name
        in nagios. So for instance the hostname would be something like:
            juju-postgresql-0
        If you're running multiple environments with the same services in them
        this allows you to differentiate between them.
  extra_archives:
    default: ""
    type: string
    description: |
        Extra archives to add with add-apt-repository(1).
  advisory_lock_restart_key:
    default: 765
    type: int
    description: |
        An advisory lock key used internally by the charm. You do not need
        to change it unless it happens to conflict with an advisory lock key
        being used by your applications.