|
5 | 5 | #
|
6 | 6 | # @param maintenance_work_mem [String] Increase to improve speed of speed of vacuuming and reindexing (Example "1GB")
|
7 | 7 | # @param work_mem [String] Allows PostgreSQL to do larger in-memory sorts (Default: "4MB")
|
8 |
| -# @param autovacumn_work_mem [String] Similar to but for maintenance_work_mem autovacuum processes only (Example "256MB") |
| 8 | +# @param autovacuum_work_mem [String] Similar to but for maintenance_work_mem autovacuum processes only (Example "256MB") |
9 | 9 | # @param autovacuum_max_workers [Integer] Maximum number of autovacuum processes to run concurrently (Default: 3)
|
10 | 10 | #
|
11 | 11 | class pe_databases::postgresql_settings (
|
12 |
| - # lint:ignore:140chars |
13 |
| - Float[0,1] $autovacuum_vacuum_scale_factor = 0.08, |
14 |
| - Float[0,1] $autovacuum_analyze_scale_factor = 0.04, |
15 |
| - Integer $autovacuum_max_workers = max(3, min(8, $facts['processors']['count'] / 3)), |
16 |
| - Integer $log_autovacuum_min_duration = -1, |
17 |
| - Integer $log_temp_files = -1, |
18 |
| - String $work_mem = '8MB', |
19 |
| - Integer $max_connections = 1000, |
20 |
| - Hash $arbitrary_postgresql_conf_settings = {}, |
21 |
| - Float[0,1] $checkpoint_completion_target = 0.9, |
22 |
| - Integer $checkpoint_segments = 128, |
23 |
| - Boolean $manage_postgresql_service = true, |
24 |
| - Boolean $all_in_one_pe_install = true, |
25 |
| - Boolean $manage_reports_autovacuum_cost_delay = true, |
26 |
| - Optional[Float[0,1]] $factsets_autovacuum_vacuum_scale_factor = 0.80, |
27 |
| - Optional[Float[0,1]] $reports_autovacuum_vacuum_scale_factor = 0.01, |
28 |
| - String $maintenance_work_mem = $all_in_one_pe_install ? { |
29 |
| - false => "${facts['memory']['system']['total_bytes'] / 1024 / 1024 / 3}MB", |
30 |
| - true => "${facts['memory']['system']['total_bytes'] / 1024 / 1024 / 8}MB", |
31 |
| - }, |
32 |
| - String $autovacuum_work_mem = $all_in_one_pe_install ? { |
33 |
| - false => "${facts['memory']['system']['total_bytes'] / 1024 / 1024 / 3 / $autovacuum_max_workers}MB", |
34 |
| - true => "${facts['memory']['system']['total_bytes'] / 1024 / 1024 / 8 / $autovacuum_max_workers}MB", |
35 |
| - }, |
| 12 | + Float[0,1] $autovacuum_vacuum_scale_factor = $pe_databases::autovacuum_vacuum_scale_factor, |
| 13 | + Float[0,1] $autovacuum_analyze_scale_factor = $pe_databases::autovacuum_analyze_scale_factor, |
| 14 | + Integer $autovacuum_max_workers = $pe_databases::autovacuum_max_workers, |
| 15 | + Integer $log_autovacuum_min_duration = $pe_databases::log_autovacuum_min_duration, |
| 16 | + Integer $log_temp_files = $pe_databases::log_temp_files, |
| 17 | + String $work_mem = $pe_databases::work_mem, |
| 18 | + Integer $max_connections = $pe_databases::max_connections, |
| 19 | + Hash $arbitrary_postgresql_conf_settings = $pe_databases::arbitrary_postgresql_conf_settings, |
| 20 | + Float[0,1] $checkpoint_completion_target = $pe_databases::checkpoint_completion_target, |
| 21 | + Integer $checkpoint_segments = $pe_databases::checkpoint_segments, |
| 22 | + Boolean $manage_postgresql_service = $pe_databases::manage_postgresql_service, |
| 23 | + Boolean $all_in_one_pe_install = $pe_databases::all_in_one_pe_install, |
| 24 | + Boolean $manage_reports_autovacuum_cost_delay = $pe_databases::manage_reports_autovacuum_cost_delay, |
| 25 | + Optional[Float[0,1]] $factsets_autovacuum_vacuum_scale_factor = $pe_databases::factsets_autovacuum_vacuum_scale_factor, |
| 26 | + Optional[Float[0,1]] $reports_autovacuum_vacuum_scale_factor = $pe_databases::reports_autovacuum_vacuum_scale_factor, |
| 27 | + String $maintenance_work_mem = $pe_databases::maintenance_work_mem, |
| 28 | + String $autovacuum_work_mem = $pe_databases::autovacuum_work_mem, |
36 | 29 | String $psql_version = $pe_databases::psql_version,
|
37 |
| - # lint:endignore |
38 | 30 | ) {
|
39 | 31 | $postgresql_service_resource_name = 'postgresqld'
|
40 | 32 | $postgresql_service_name = 'pe-postgresql'
|
|
0 commit comments