@@ -141,16 +141,15 @@ postgresql_shared_buffers: 128MB # min 128kB
141
141
postgresql_huge_pages : try # on, off, or try
142
142
postgresql_temp_buffers : 8MB # min 800kB
143
143
144
- # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
145
- # per transaction slot, plus lock space (see max_locks_per_transaction).
146
- # It is not advisable to set max_prepared_transactions nonzero unless you
147
- # actively intend to use prepared transactions.
144
+ # Caution: it is not advisable to set max_prepared_transactions nonzero unless
145
+ # you actively intend to use prepared transactions.
148
146
postgresql_max_prepared_transactions : 0 # zero disables the feature
149
147
150
- postgresql_work_mem : 1MB # min 64kB
151
- postgresql_maintenance_work_mem : 16MB # min 1MB
152
- postgresql_autovacuum_work_mem : -1 # min 1MB, or -1 to use maintenance_work_mem
153
- postgresql_max_stack_depth : 2MB # min 100kB
148
+ postgresql_work_mem : 1MB # min 64kB
149
+ postgresql_maintenance_work_mem : 16MB # min 1MB
150
+ postgresql_replacement_sort_tuples : 150000 # (>= 9.6) limits use of replacement selection sort
151
+ postgresql_autovacuum_work_mem : -1 # min 1MB, or -1 to use maintenance_work_mem
152
+ postgresql_max_stack_depth : 2MB # min 100kB
154
153
postgresql_dynamic_shared_memory_type : posix # the default is the first option
155
154
# supported by the operating system:
156
155
# posix
@@ -162,7 +161,7 @@ postgresql_dynamic_shared_memory_type: posix # the default is the first optio
162
161
163
162
# - Disk -
164
163
165
- # limits per-session temp file space in kB, or -1 for no limit (>= 9.2)
164
+ # limits per-process temp file space in kB, or -1 for no limit (>= 9.2)
166
165
postgresql_temp_file_limit : -1
167
166
168
167
@@ -185,13 +184,19 @@ postgresql_vacuum_cost_limit: 200 # 1-10000 credits
185
184
186
185
postgresql_bgwriter_delay : 200ms # 10-10000ms between rounds
187
186
postgresql_bgwriter_lru_maxpages : 100 # 0-1000 max buffers written/round
188
- postgresql_bgwriter_lru_multiplier : 2.0 # 0-10.0 multipler on buffers scanned/round
187
+ postgresql_bgwriter_lru_multiplier : 2.0 # 0-10.0 multiplier on buffers scanned/round
188
+ postgresql_bgwriter_flush_after : 0 # (>= 9.6) 0 disables,
189
+ # default is 512kB on linux, 0 otherwise
189
190
190
191
191
192
# - Asynchronous Behavior -
192
193
193
- postgresql_effective_io_concurrency : 1 # 1-1000; 0 disables prefetching
194
- postgresql_max_worker_processes : 8
194
+ postgresql_effective_io_concurrency : 1 # 1-1000; 0 disables prefetching
195
+ postgresql_max_worker_processes : 8 # (change requires restart)
196
+ postgresql_max_parallel_workers_per_gather : 0 # (>= 9.6) taken from max_worker_processes
197
+ postgresql_old_snapshot_threshold : -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
198
+ # (change requires restart)
199
+ postgresql_backend_flush_after : 0 # (>= 9.6) 0 disables, default is 0
195
200
196
201
197
202
# ------------------------------------------------------------------------------
@@ -200,13 +205,16 @@ postgresql_max_worker_processes: 8
200
205
201
206
# - Settings -
202
207
203
- postgresql_wal_level : minimal # minimal, archive, hot_standby, or logical
204
- postgresql_fsync : on # turns forced synchronization on or off
208
+ postgresql_wal_level : minimal # minimal, archive (<= 9.5), hot_standby (<= 9.5), replica (>= 9.6), or logical
209
+ postgresql_fsync : on # flush data to disk for crash safety
210
+ # (turning this off can cause
211
+ # unrecoverable data corruption)
205
212
206
213
# Synchronization level:
207
214
# - off
208
215
# - local
209
216
# - remote_write
217
+ # - remote_apply (>= 9.6)
210
218
# - on
211
219
postgresql_synchronous_commit : " on"
212
220
@@ -223,18 +231,21 @@ postgresql_full_page_writes: on
223
231
postgresql_wal_compression : off # (>= 9.5)
224
232
postgresql_wal_log_hints : off # also do full page writes of non-critical updates
225
233
226
- postgresql_wal_buffers : -1 # min 32kB, -1 sets based on shared_buffers
227
- postgresql_wal_writer_delay : 200ms # 1-10000 milliseconds
228
- postgresql_commit_delay : 0 # range 0-100000, in microseconds
229
- postgresql_commit_siblings : 5 # range 1-1000
234
+ postgresql_wal_buffers : -1 # min 32kB, -1 sets based on shared_buffers
235
+ postgresql_wal_writer_delay : 200ms # 1-10000 milliseconds
236
+ postgresql_wal_writer_flush_after : 1MB # (>= 9.6) 0 disables
237
+ postgresql_commit_delay : 0 # range 0-100000, in microseconds
238
+ postgresql_commit_siblings : 5 # range 1-1000
230
239
231
240
232
241
# - Checkpoints -
233
242
234
243
postgresql_checkpoint_segments : 3 # (<= 9.4) in logfile segments, min 1, 16MB each
235
244
postgresql_max_wal_size : 1GB # (>= 9.5)
236
245
postgresql_min_wal_size : 80MB # (>= 9.5)
237
- postgresql_checkpoint_timeout : 5min # range 30s-1h
246
+ postgresql_checkpoint_flush_after : 0 # (>= 9.6) 0 disables,
247
+ # default is 256kB on linux, 0 otherwise
248
+ postgresql_checkpoint_timeout : 5min # range 30s-1d
238
249
postgresql_checkpoint_completion_target : 0.5 # checkpoint target duration, 0.0 - 1.0
239
250
postgresql_checkpoint_warning : 30s # 0 disables
240
251
@@ -277,8 +288,9 @@ postgresql_track_commit_timestamp: off # (>= 9.5)
277
288
278
289
# These settings are ignored on a standby server.
279
290
280
- # Standby servers that provide sync rep.
281
- # Comma-separated list of application_name from standby(s)
291
+ # standby servers that provide sync rep.
292
+ # number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
293
+ postgresql_synchronous_standby_num_sync : ' '
282
294
postgresql_synchronous_standby_names : [] # '*' means 'all'
283
295
284
296
# number of xacts by which cleanup is delayed
@@ -308,47 +320,51 @@ postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
308
320
309
321
# - Planner Method Configuration -
310
322
311
- postgresql_enable_bitmapscan : on
312
- postgresql_enable_hashagg : on
313
- postgresql_enable_hashjoin : on
314
- postgresql_enable_indexscan : on
315
- postgresql_enable_indexonlyscan : on
316
- postgresql_enable_material : on
317
- postgresql_enable_mergejoin : on
318
- postgresql_enable_nestloop : on
319
- postgresql_enable_seqscan : on
320
- postgresql_enable_sort : on
321
- postgresql_enable_tidscan : on
323
+ postgresql_enable_bitmapscan : on
324
+ postgresql_enable_hashagg : on
325
+ postgresql_enable_hashjoin : on
326
+ postgresql_enable_indexscan : on
327
+ postgresql_enable_indexonlyscan : on
328
+ postgresql_enable_material : on
329
+ postgresql_enable_mergejoin : on
330
+ postgresql_enable_nestloop : on
331
+ postgresql_enable_seqscan : on
332
+ postgresql_enable_sort : on
333
+ postgresql_enable_tidscan : on
322
334
323
335
324
336
# - Planner Cost Constants -
325
337
326
- postgresql_seq_page_cost : 1.0 # measured on an arbitrary scale
327
- postgresql_random_page_cost : 4.0 # same scale as above
328
- postgresql_cpu_tuple_cost : 0.01 # same scale as above
329
- postgresql_cpu_index_tuple_cost : 0.005 # same scale as above
330
- postgresql_cpu_operator_cost : 0.0025 # same scale as above
331
- postgresql_effective_cache_size : 128MB
338
+ postgresql_seq_page_cost : 1.0 # measured on an arbitrary scale
339
+ postgresql_random_page_cost : 4.0 # same scale as above
340
+ postgresql_cpu_tuple_cost : 0.01 # same scale as above
341
+ postgresql_cpu_index_tuple_cost : 0.005 # same scale as above
342
+ postgresql_cpu_operator_cost : 0.0025 # same scale as above
343
+ postgresql_parallel_tuple_cost : 0.1 # same scale as above (>= 9.6)
344
+ postgresql_parallel_setup_cost : 1000.0 # same scale as above (>= 9.6)
345
+ postgresql_min_parallel_relation_size : 8MB # (>= 9.6)
346
+ postgresql_effective_cache_size : 128MB
332
347
333
348
334
349
# - Genetic Query Optimizer -
335
350
336
- postgresql_geqo : on
337
- postgresql_geqo_threshold : 12
338
- postgresql_geqo_effort : 5 # range 1-10
339
- postgresql_geqo_pool_size : 0 # selects default based on effort
340
- postgresql_geqo_generations : 0 # selects default based on effort
341
- postgresql_geqo_selection_bias : 2.0 # range 1.5-2.0
342
- postgresql_geqo_seed : 0.0 # range 0.0-1.0
351
+ postgresql_geqo : on
352
+ postgresql_geqo_threshold : 12
353
+ postgresql_geqo_effort : 5 # range 1-10
354
+ postgresql_geqo_pool_size : 0 # selects default based on effort
355
+ postgresql_geqo_generations : 0 # selects default based on effort
356
+ postgresql_geqo_selection_bias : 2.0 # range 1.5-2.0
357
+ postgresql_geqo_seed : 0.0 # range 0.0-1.0
343
358
344
359
345
360
# - Other Planner Options -
346
361
347
- postgresql_default_statistics_target : 100 # range 1-10000
348
- postgresql_constraint_exclusion : partition # on, off, or partition
349
- postgresql_cursor_tuple_fraction : 0.1 # range 0.0-1.0
350
- postgresql_from_collapse_limit : 8
351
- postgresql_join_collapse_limit : 8 # 1 disables collapsing of explicit
362
+ postgresql_default_statistics_target : 100 # range 1-10000
363
+ postgresql_constraint_exclusion : partition # on, off, or partition
364
+ postgresql_cursor_tuple_fraction : 0.1 # range 0.0-1.0
365
+ postgresql_from_collapse_limit : 8
366
+ postgresql_join_collapse_limit : 8 # 1 disables collapsing of explicit
367
+ postgresql_force_parallel_mode : off # (>= 9.6)
352
368
353
369
354
370
# ------------------------------------------------------------------------------
@@ -359,34 +375,36 @@ postgresql_join_collapse_limit: 8 # 1 disables collapsing of expl
359
375
360
376
# Valid values are combinations of stderr, csvlog, syslog, and eventlog.
361
377
# depending on platform. Csvlog requires logging_collector to be on.
362
- postgresql_log_destination : stderr
378
+ postgresql_log_destination : stderr
363
379
364
380
# Enable capturing of stderr and csvlog into log files.
365
381
# Required to be on for csvlogs.
366
- postgresql_logging_collector : off
382
+ postgresql_logging_collector : off
367
383
368
384
# These are only used if logging_collector is on:
369
385
370
386
# Directory where log files are written, can be absolute or relative to PGDATA
371
- postgresql_log_directory : pg_log
387
+ postgresql_log_directory : pg_log
372
388
# Log file name pattern, can include strftime() escapes
373
- postgresql_log_filename : postgresql-%Y-%m-%d_%H%M%S.log
374
- postgresql_log_file_mode : ' 0600' # begin with 0 to use octal notation
389
+ postgresql_log_filename : postgresql-%Y-%m-%d_%H%M%S.log
390
+ postgresql_log_file_mode : ' 0600' # begin with 0 to use octal notation
375
391
# If on, an existing log file with the same name as the new log file will be
376
392
# truncated rather than appended to. But such truncation only occurs on
377
393
# time-driven rotation, not on restarts or size-driven rotation. Default is
378
394
# off, meaning append to existing files in all cases.
379
- postgresql_log_truncate_on_rotation : off
395
+ postgresql_log_truncate_on_rotation : off
380
396
# Automatic rotation of logfiles will happen after that time.
381
- postgresql_log_rotation_age : 1d
397
+ postgresql_log_rotation_age : 1d
382
398
# Automatic rotation of logfiles will happen after that much log output.
383
- postgresql_log_rotation_size : 10MB
399
+ postgresql_log_rotation_size : 10MB
384
400
385
401
# These are relevant when logging to syslog:
386
- postgresql_syslog_facility : LOCAL0
387
- postgresql_syslog_ident : postgres
402
+ postgresql_syslog_facility : LOCAL0
403
+ postgresql_syslog_ident : postgres
404
+ postgresql_syslog_sequence_numbers : on # (>= 9.6)
405
+ postgresql_syslog_split_messages : on # (>= 9.6)
388
406
# This is only relevant when logging to eventlog (win32) (>= 9.2):
389
- postgresql_event_source : PostgreSQL
407
+ postgresql_event_source : PostgreSQL
390
408
391
409
392
410
# - When to Log -
@@ -460,6 +478,7 @@ postgresql_log_hostname: off
460
478
# %p = process ID
461
479
# %t = timestamp without milliseconds
462
480
# %m = timestamp with milliseconds
481
+ # %n = timestamp with milliseconds (as a Unix epoch)
463
482
# %i = command tag
464
483
# %e = SQL state
465
484
# %c = session ID
@@ -552,12 +571,13 @@ postgresql_default_transaction_read_only: off
552
571
postgresql_default_transaction_deferrable : off
553
572
postgresql_session_replication_role : origin
554
573
555
- postgresql_statement_timeout : 0 # in milliseconds, 0 is disabled
556
- postgresql_lock_timeout : 0 # in milliseconds, 0 is disabled (>= 9.3)
557
- postgresql_vacuum_freeze_min_age : 50000000
558
- postgresql_vacuum_freeze_table_age : 150000000
559
- postgresql_vacuum_multixact_freeze_min_age : 5000000 # (>= 9.3)
560
- postgresql_vacuum_multixact_freeze_table_age : 150000000 # (>= 9.3)
574
+ postgresql_statement_timeout : 0 # in milliseconds, 0 is disabled
575
+ postgresql_lock_timeout : 0 # in milliseconds, 0 is disabled (>= 9.3)
576
+ postgresql_idle_in_transaction_session_timeout : 0 # in milliseconds, 0 is disabled (>= 9.6)
577
+ postgresql_vacuum_freeze_min_age : 50000000
578
+ postgresql_vacuum_freeze_table_age : 150000000
579
+ postgresql_vacuum_multixact_freeze_min_age : 5000000 # (>= 9.3)
580
+ postgresql_vacuum_multixact_freeze_table_age : 150000000 # (>= 9.3)
561
581
562
582
postgresql_bytea_output : hex # hex, escape
563
583
postgresql_xmlbinary : base64
@@ -680,6 +700,39 @@ postgresql_pgdg_dists:
680
700
Scientific : sl
681
701
SLC : sl
682
702
OracleLinux : oraclelinux
703
+ postgresql_pgdg_releases :
704
+ redhat : {
705
+ 9.1 : 8,
706
+ 9.2 : 9,
707
+ 9.3 : 3,
708
+ 9.4 : 3,
709
+ 9.5 : 3,
710
+ 9.6 : 3,
711
+ }
712
+ centos : {
713
+ 9.1 : 7,
714
+ 9.2 : 8,
715
+ 9.3 : 3,
716
+ 9.4 : 3,
717
+ 9.5 : 3,
718
+ 9.6 : 3,
719
+ }
720
+ sl : {
721
+ 9.1 : 8,
722
+ 9.2 : 9,
723
+ 9.3 : 3,
724
+ 9.4 : 3,
725
+ 9.5 : 3,
726
+ 9.6 : 3,
727
+ }
728
+ oraclelinux : {
729
+ 9.1 : 8,
730
+ 9.2 : 9,
731
+ 9.3 : 3,
732
+ 9.4 : 3,
733
+ 9.5 : 3,
734
+ 9.6 : 3,
735
+ }
683
736
postgresql_version_terse : " {{ postgresql_version | replace('.', '') }}"
684
737
postgresql_yum_repository_base_url : " http://yum.postgresql.org"
685
- postgresql_yum_repository_url : " {{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ postgresql_pgdg_dists[ansible_distribution] }}{{ postgresql_version_terse }}-{{ postgresql_version }}-2 .noarch.rpm"
738
+ postgresql_yum_repository_url : " {{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ postgresql_pgdg_dists[ansible_distribution] }}{{ postgresql_version_terse }}-{{ postgresql_version }}-{{ postgresql_pgdg_releases.get(postgresql_pgdg_dists[ansible_distribution]).get(postgresql_version) }} .noarch.rpm"
0 commit comments