From 0633ac6e792e81b9c4ea92c390fe17c1bc1e27ca Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 8 Nov 2022 09:36:46 +0000 Subject: [PATCH] Release prep v3.0.0 --- CHANGELOG.md | 12 ++ REFERENCE.md | 370 ++++++++++---------------------------------------- metadata.json | 2 +- 3 files changed, 88 insertions(+), 296 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a073da..68321b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +## [v3.0.0](https://github.com/puppetlabs/puppetlabs-pe_databases/tree/v3.0.0) (2022-11-08) + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-pe_databases/compare/v2.3.0...v3.0.0) + +### Changed + +- \(SUP-3672\) Remove legacy code and add spec tests [\#112](https://github.com/puppetlabs/puppetlabs-pe_databases/pull/112) ([m0dular](https://github.com/m0dular)) + +### Added + +- make systemd timers configurable [\#109](https://github.com/puppetlabs/puppetlabs-pe_databases/pull/109) ([SimonHoenscheid](https://github.com/SimonHoenscheid)) + ## [v2.3.0](https://github.com/puppetlabs/puppetlabs-pe_databases/tree/v2.3.0) (2022-07-21) [Full Changelog](https://github.com/puppetlabs/puppetlabs-pe_databases/compare/v2.2.0...v2.3.0) diff --git a/REFERENCE.md b/REFERENCE.md index e48c492..7b76f66 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -8,18 +8,10 @@ * [`pe_databases`](#pe_databases): Tuning, maintenance for PE PostgreSQL. * [`pe_databases::pg_repack`](#pe_databasespg_repack): Provides systemd timers to pg_repack tables in the pe-puppetdb database -* [`pe_databases::postgresql_settings`](#pe_databasespostgresql_settings): Tune PostgreSQL settings -* [`pe_databases::postgresql_settings::table_settings`](#pe_databasespostgresql_settingstable_settings): Tune PostgreSQL table settings ### Defined types * [`pe_databases::collect`](#pe_databasescollect): Create systemd units for repacking a given database type -* [`pe_databases::set_puppetdb_table_autovacuum_cost_delay_zero`](#pe_databasesset_puppetdb_table_autovacuum_cost_delay_zero): Defined type for PostgreSQL autovacuum_cost_delay -* [`pe_databases::set_table_attribute`](#pe_databasesset_table_attribute): Defined type for PostgreSQL table attributes - -### Functions - -* [`pe_databases::version_based_databases`](#pe_databasesversion_based_databases) ### Tasks @@ -35,43 +27,39 @@ Tuning, maintenance for PE PostgreSQL. The following parameters are available in the `pe_databases` class: +* [`manage_database_maintenance`](#manage_database_maintenance) * [`disable_maintenance`](#disable_maintenance) -* [`manage_postgresql_settings`](#manage_postgresql_settings) -* [`manage_table_settings`](#manage_table_settings) * [`install_dir`](#install_dir) * [`scripts_dir`](#scripts_dir) -* [`manage_database_maintenance`](#manage_database_maintenance) - -##### `disable_maintenance` - -Data type: `Boolean` - -true or false (Default: false) -Disable or enable maintenance mode - -Default value: `lookup('pe_databases::disable_maintenance', {'default_value' => false})` +* [`facts_tables_repack_timer`](#facts_tables_repack_timer) +* [`catalogs_tables_repack_timer`](#catalogs_tables_repack_timer) +* [`other_tables_repack_timer`](#other_tables_repack_timer) +* [`manage_postgresql_settings`](#manage_postgresql_settings) +* [`manage_table_settings`](#manage_table_settings) +* [`reports_tables_repack_timer`](#reports_tables_repack_timer) +* [`resource_events_tables_repack_timer`](#resource_events_tables_repack_timer) -##### `manage_postgresql_settings` +##### `manage_database_maintenance` Data type: `Boolean` true or false (Default: true) -Manage PostgreSQL settings +Manage the inclusion of the pg_repack class Default value: ``true`` -##### `manage_table_settings` +##### `disable_maintenance` Data type: `Boolean` true or false (Default: false) -Manage table settings +Disable or enable maintenance mode Default value: ``false`` ##### `install_dir` -Data type: `String` +Data type: `String[1]` Directory to install module into (Default: "/opt/puppetlabs/pe_databases") @@ -79,279 +67,140 @@ Default value: `'/opt/puppetlabs/pe_databases'` ##### `scripts_dir` -Data type: `String` +Data type: `String[1]` Directory to install scripts into (Default: "${install_dir}/scripts") Default value: `"${install_dir}/scripts"` -##### `manage_database_maintenance` - -Data type: `Boolean` - - - -Default value: ``true`` - -### `pe_databases::pg_repack` - -Maintenance pg_repack - -#### Parameters - -The following parameters are available in the `pe_databases::pg_repack` class: - -* [`disable_maintenance`](#disable_maintenance) -* [`jobs`](#jobs) - -##### `disable_maintenance` - -Data type: `Boolean` - -true or false (Default: false) -Disable or enable maintenance mode - -Default value: ``false`` - -##### `jobs` +##### `facts_tables_repack_timer` -Data type: `Integer` +Data type: `String[1]` -How many jobs to run in parallel - -Default value: `/` +The Systemd timer for the pg_repack job affecting the 'facts' tables -### `pe_databases::postgresql_settings` - -Tune PostgreSQL - -#### Parameters - -The following parameters are available in the `pe_databases::postgresql_settings` class: - -* [`maintenance_work_mem`](#maintenance_work_mem) -* [`work_mem`](#work_mem) -* [`autovacumn_work_mem`](#autovacumn_work_mem) -* [`autovacuum_max_workers`](#autovacuum_max_workers) -* [`autovacuum_vacuum_scale_factor`](#autovacuum_vacuum_scale_factor) -* [`autovacuum_analyze_scale_factor`](#autovacuum_analyze_scale_factor) -* [`log_autovacuum_min_duration`](#log_autovacuum_min_duration) -* [`log_temp_files`](#log_temp_files) -* [`max_connections`](#max_connections) -* [`arbitrary_postgresql_conf_settings`](#arbitrary_postgresql_conf_settings) -* [`checkpoint_completion_target`](#checkpoint_completion_target) -* [`checkpoint_segments`](#checkpoint_segments) -* [`manage_postgresql_service`](#manage_postgresql_service) -* [`all_in_one_pe_install`](#all_in_one_pe_install) -* [`manage_reports_autovacuum_cost_delay`](#manage_reports_autovacuum_cost_delay) -* [`factsets_autovacuum_vacuum_scale_factor`](#factsets_autovacuum_vacuum_scale_factor) -* [`reports_autovacuum_vacuum_scale_factor`](#reports_autovacuum_vacuum_scale_factor) -* [`autovacuum_work_mem`](#autovacuum_work_mem) -* [`psql_version`](#psql_version) - -##### `maintenance_work_mem` - -Data type: `String` +Default value: `'Tue,Sat *-*-* 04:30:00'` -Increase to improve speed of speed of vacuuming and reindexing (Example "1GB") +##### `catalogs_tables_repack_timer` -Default value: `$all_in_one_pe_install` - -##### `work_mem` - -Data type: `String` - -Allows PostgreSQL to do larger in-memory sorts (Default: "4MB") - -Default value: `'8MB'` - -##### `autovacumn_work_mem` - -Data type: `String` - -Similar to but for maintenance_work_mem autovacuum processes only (Example "256MB") - -##### `autovacuum_max_workers` - -Data type: `Integer` +Data type: `String[1]` -Maximum number of autovacuum processes to run concurrently (Default: 3) +The Systemd timer for the pg_repack job affecting the 'catalog' tables -Default value: `max(3, min(8, $facts['processors']['count'] / 3))` +Default value: `'Sun,Thu *-*-* 04:30:00'` -##### `autovacuum_vacuum_scale_factor` - -Data type: `Float[0,1]` - - - -Default value: `0.08` - -##### `autovacuum_analyze_scale_factor` - -Data type: `Float[0,1]` - - - -Default value: `0.04` - -##### `log_autovacuum_min_duration` - -Data type: `Integer` - - - -Default value: `-` - -##### `log_temp_files` - -Data type: `Integer` - - - -Default value: `-` - -##### `max_connections` - -Data type: `Integer` +##### `other_tables_repack_timer` +Data type: `String[1]` +The Systemd timer for the pg_repack job affecting the 'other' tables -Default value: `1000` +Default value: `'*-*-20 05:30:00'` -##### `arbitrary_postgresql_conf_settings` +##### `manage_postgresql_settings` -Data type: `Hash` +Data type: `Optional[Boolean]` -Default value: `{}` +Default value: ``undef`` -##### `checkpoint_completion_target` +##### `manage_table_settings` -Data type: `Float[0,1]` +Data type: `Optional[Boolean]` -Default value: `0.9` +Default value: ``undef`` -##### `checkpoint_segments` +##### `reports_tables_repack_timer` -Data type: `Integer` +Data type: `Optional[String]` -Default value: `128` +Default value: ``undef`` -##### `manage_postgresql_service` +##### `resource_events_tables_repack_timer` -Data type: `Boolean` +Data type: `Optional[String]` -Default value: ``true`` +Default value: ``undef`` -##### `all_in_one_pe_install` +### `pe_databases::pg_repack` -Data type: `Boolean` +Maintenance pg_repack +#### Parameters +The following parameters are available in the `pe_databases::pg_repack` class: -Default value: ``true`` +* [`disable_maintenance`](#disable_maintenance) +* [`jobs`](#jobs) +* [`facts_tables_repack_timer`](#facts_tables_repack_timer) +* [`catalogs_tables_repack_timer`](#catalogs_tables_repack_timer) +* [`other_tables_repack_timer`](#other_tables_repack_timer) +* [`reports_tables_repack_timer`](#reports_tables_repack_timer) +* [`resource_events_tables_repack_timer`](#resource_events_tables_repack_timer) -##### `manage_reports_autovacuum_cost_delay` +##### `disable_maintenance` Data type: `Boolean` +true or false (Default: false) +Disable or enable maintenance mode +Default value: ``false`` -Default value: ``true`` - -##### `factsets_autovacuum_vacuum_scale_factor` - -Data type: `Optional[Float[0,1]]` - - - -Default value: `0.80` - -##### `reports_autovacuum_vacuum_scale_factor` - -Data type: `Optional[Float[0,1]]` - - - -Default value: `0.01` - -##### `autovacuum_work_mem` - -Data type: `String` - - - -Default value: `$all_in_one_pe_install` - -##### `psql_version` - -Data type: `String` - - - -Default value: `$pe_databases::psql_version` - -### `pe_databases::postgresql_settings::table_settings` - -Tune PostgreSQL table settings - -#### Parameters - -The following parameters are available in the `pe_databases::postgresql_settings::table_settings` class: - -* [`manage_reports_autovacuum_cost_delay`](#manage_reports_autovacuum_cost_delay) -* [`factsets_autovacuum_vacuum_scale_factor`](#factsets_autovacuum_vacuum_scale_factor) -* [`reports_autovacuum_vacuum_scale_factor`](#reports_autovacuum_vacuum_scale_factor) -* [`catalogs_autovacuum_vacuum_scale_factor`](#catalogs_autovacuum_vacuum_scale_factor) -* [`certnames_autovacuum_vacuum_scale_factor`](#certnames_autovacuum_vacuum_scale_factor) +##### `jobs` -##### `manage_reports_autovacuum_cost_delay` +Data type: `Integer` -Data type: `Boolean` +How many jobs to run in parallel +Default value: `/` +##### `facts_tables_repack_timer` -Default value: `lookup('pe_databases::postgresql_settings::manage_reports_autovacuum_cost_delay', {'default_value' => true})` +Data type: `String[1]` -##### `factsets_autovacuum_vacuum_scale_factor` +The Systemd timer for the pg_repack job affecting the 'facts' tables -Data type: `Optional[Float[0,1]]` +Default value: `$pe_databases::facts_tables_repack_timer` +##### `catalogs_tables_repack_timer` +Data type: `String[1]` -Default value: `lookup('pe_databases::postgresql_settings::factsets_autovacuum_vacuum_scale_factor', {'default_value' => 0.80})` +The Systemd timer for the pg_repack job affecting the 'catalog' tables -##### `reports_autovacuum_vacuum_scale_factor` +Default value: `$pe_databases::catalogs_tables_repack_timer` -Data type: `Optional[Float[0,1]]` +##### `other_tables_repack_timer` +Data type: `String[1]` +The Systemd timer for the pg_repack job affecting the 'other' tables -Default value: `lookup('pe_databases::postgresql_settings::reports_autovacuum_vacuum_scale_factor', {'default_value' => 0.01})` +Default value: `$pe_databases::other_tables_repack_timer` -##### `catalogs_autovacuum_vacuum_scale_factor` +##### `reports_tables_repack_timer` -Data type: `Optional[Float[0,1]]` +Data type: `Optional[String]` -Default value: `0.75` +Default value: ``undef`` -##### `certnames_autovacuum_vacuum_scale_factor` +##### `resource_events_tables_repack_timer` -Data type: `Optional[Float[0,1]]` +Data type: `Optional[String]` -Default value: `0.75` +Default value: ``undef`` ## Defined types @@ -400,75 +249,6 @@ values can be found in pg_repack.pp Default value: ``undef`` -### `pe_databases::set_puppetdb_table_autovacuum_cost_delay_zero` - -Defined type for PostgreSQL autovacuum_cost_delay - -#### Parameters - -The following parameters are available in the `pe_databases::set_puppetdb_table_autovacuum_cost_delay_zero` defined type: - -* [`table_name`](#table_name) - -##### `table_name` - -Data type: `String` - -Name of the table - -Default value: `$title` - -### `pe_databases::set_table_attribute` - -Defined type for PostgreSQL table attributes - -#### Parameters - -The following parameters are available in the `pe_databases::set_table_attribute` defined type: - -* [`db`](#db) -* [`table_name`](#table_name) -* [`table_attribute`](#table_attribute) -* [`table_attribute_value`](#table_attribute_value) - -##### `db` - -Data type: `String` - -Name of the database, this is pe-puppetdb for the uses of this module. - -##### `table_name` - -Data type: `String` - -Name of the table in the database. - -##### `table_attribute` - -Data type: `String` - -Set to the table attribute value. - -##### `table_attribute_value` - -Data type: `String` - -Value of setting for the table set in table_settings.pp - -## Functions - -### `pe_databases::version_based_databases` - -Type: Puppet Language - -The pe_databases::version_based_databases function. - -#### `pe_databases::version_based_databases()` - -The pe_databases::version_based_databases function. - -Returns: `Array[String]` - ## Tasks ### `reset_pgrepack_schema` diff --git a/metadata.json b/metadata.json index ec98b51..dc9071b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-pe_databases", - "version": "2.3.0", + "version": "3.0.0", "author": "puppetlabs", "summary": "A Puppet Module for Maintaining Your Puppet Enterprise Databases", "license": "Apache-2.0",