|
8 | 8 | # @param activity_tables [Array] Array of 'activity' tables to repack
|
9 | 9 | # @param disable_maintenance [Boolean] true or false (Default: false)
|
10 | 10 | # Disable or enable maintenance mode
|
| 11 | +# @param repack_log_level [Enum] Desired output level of logs |
| 12 | +# @param enable_echo [Boolean] true or false (Default: true) |
| 13 | +# Enabling echo output in logs |
11 | 14 | # @param jobs [Integer] How many jobs to run in parallel
|
12 | 15 | # @param facts_tables_repack_timer [String] The Systemd timer for the pg_repack job affecting the 'facts' tables
|
13 | 16 | # @param catalogs_tables_repack_timer [String]The Systemd timer for the pg_repack job affecting the 'catalog' tables
|
|
22 | 25 | Array $other_tables,
|
23 | 26 | Array $activity_tables,
|
24 | 27 | Boolean $disable_maintenance = false,
|
| 28 | + Enum['INFO','NOTICE','WARNING','ERROR','LOG','FATAL','PANIC','DEBUG'] $repack_log_level='DEBUG', |
| 29 | + Boolean $enable_echo = true, |
25 | 30 | Integer $jobs = $facts['processors']['count'] / 4,
|
26 | 31 | String[1] $facts_tables_repack_timer = $pe_databases::facts_tables_repack_timer,
|
27 | 32 | String[1] $catalogs_tables_repack_timer = $pe_databases::catalogs_tables_repack_timer,
|
|
36 | 41 | $postgresql_version = $facts['pe_postgresql_info']['installed_server_version']
|
37 | 42 | $repack_executable = "/opt/puppetlabs/server/apps/postgresql/${postgresql_version}/bin/pg_repack"
|
38 | 43 |
|
39 |
| - $repack_cmd = "${repack_executable} --jobs ${jobs}" |
| 44 | + if $enable_echo { |
| 45 | + $repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_log_level} --echo" |
| 46 | + } else { |
| 47 | + $repack_cmd = "${repack_executable} --jobs ${jobs} --elevel ${repack_log_level}" |
| 48 | + } |
40 | 49 |
|
41 | 50 | pe_databases::collect { 'facts':
|
42 | 51 | disable_maintenance => $disable_maintenance,
|
|
0 commit comments