Skip to content

Commit

Permalink
Merge pull request #101 from jordiprats/master
Browse files Browse the repository at this point in the history
settings varis
  • Loading branch information
jordiprats authored Apr 22, 2020
2 parents a6f727a + 46fb43c commit b979c0d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 0.4.12

* added more autovacuum settings
* added bonjour options
* added checkpoint settings
* added effective_io_concurrency setting; for SSD disks

## 0.4.11

* added options for setting default local entries on pg_hba
Expand Down
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
# config
$listen = [ '*' ],
$port = $postgresql::params::port_default,
$bonjour = false,
$bonjour_name = '',
$max_connections = '100',
$wal_level = 'hot_standby',
$max_wal_senders = '5',
Expand All @@ -70,12 +72,19 @@
$log_file_mode = '0600',
$track_activities = true,
$track_counts = true,
$effective_io_concurrency = '1',
$checkpoint_timeout = '5min',
$checkpoint_completion_target = '0.5',
$vacuum_cost_limit = '200',
$autovacuum = true,
$autovacuum_vacuum_scale_factor = '0.0',
$autovacuum_vacuum_threshold = '5000',
$autovacuum_analyze_scale_factor = '0.0',
$autovacuum_analyze_threshold = '5000',
$autovacuum_freeze_max_age = undef,
$autovacuum_naptime = '1min',
$autovacuum_max_workers = '3',
$autovacuum_vacuum_cost_limit = '-1',
$timezone = $postgresql::params::timezone_default,
$superuser_reserved_connections = '5',
$archive_mode = true,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-postgresql",
"version": "0.4.11",
"version": "0.4.12",
"author": "eyp",
"summary": "postgresql and pgbounce installation, configuration and management",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions templates/hba/rule.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

# rule: <%=@description%>
<%=@type%> <%=@database%> <%=@user%> <%=@address%> <%=@auth_method%> <%=@auth_option%>
# rule: <%= @description %>
<%= @type %> <%= @database %> <%= @user %> <%= @address %> <%= @auth_method %> <%= @auth_option %>
21 changes: 11 additions & 10 deletions templates/postgresconf.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# puppet managed file - do NOT edit
# puppet managed file
#

# -----------------------------
Expand Down Expand Up @@ -71,9 +71,9 @@ superuser_reserved_connections = <%= @superuser_reserved_connections %> # (chang
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
bonjour = <%= scope.function_bool2onoff([@bonjour]) %> # advertise server via Bonjour
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
bonjour_name = '<%= @bonjour_name %>' # defaults to the computer name
# (change requires restart)

# - Security and Authentication -
Expand Down Expand Up @@ -142,7 +142,7 @@ maintenance_work_mem = <%= @maintenance_work_mem %> # min 1MB
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 1-10000 credits
vacuum_cost_limit = <%= @vacuum_cost_limit %> # 1-10000 credits

# - Background Writer -

Expand All @@ -152,7 +152,7 @@ maintenance_work_mem = <%= @maintenance_work_mem %> # min 1MB

# - Asynchronous Behavior -

#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
effective_io_concurrency = <%= @effective_io_concurrency %> # 1-1000; 0 disables prefetching


<% if scope.function_versioncmp([@version, '9.6']) >= 0 -%>
Expand Down Expand Up @@ -205,8 +205,8 @@ wal_compression = <%= scope.function_bool2onoff([@wal_compression]) %>
<% if scope.function_versioncmp([@version, '9.5']) < 0 -%>
checkpoint_segments = <%= @checkpoint_segments %> # in logfile segments, min 1, 16MB each
<% end -%>
#checkpoint_timeout = 5min # range 30s-1h
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
checkpoint_timeout = <%= @checkpoint_timeout %> # range 30s-1h
checkpoint_completion_target = <%= @checkpoint_completion_target %> # checkpoint target duration, 0.0 - 1.0
#checkpoint_warning = 30s # 0 disables

# - Archiving -
Expand Down Expand Up @@ -482,9 +482,10 @@ log_autovacuum_min_duration = <%= @log_autovacuum_min_duration %> # -1 disables,
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
#autovacuum_max_workers = 3 # max number of autovacuum subprocesses
autovacuum_max_workers = <%= @autovacuum_max_workers %> # max number of autovacuum subprocesses
# (change requires restart)
#autovacuum_naptime = 1min # time between autovacuum runs
autovacuum_naptime = <%= @autovacuum_naptime %> # time between autovacuum runs

# vacuum
autovacuum_vacuum_threshold = <%= @autovacuum_vacuum_threshold %> # min number of row updates before
autovacuum_vacuum_scale_factor = <%= @autovacuum_vacuum_scale_factor %> # fraction of table size before vacuum
Expand All @@ -499,7 +500,7 @@ autovacuum_freeze_max_age = <%= @autovacuum_freeze_max_age %> # maximum XID age
#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
# autovacuum, in milliseconds;
# -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
#autovacuum_vacuum_cost_limit = <%= @autovacuum_vacuum_cost_limit %> # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit

Expand Down

0 comments on commit b979c0d

Please sign in to comment.