Puppet Class: profile::wmcs::services::postgres::common

Defined in:
modules/profile/manifests/wmcs/services/postgres/common.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • root_dir (Stdlib::Unixpath) (defaults to: lookup('profile::wmcs::services::postgres::root_dir', {default_value => '/srv/postgres'}))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/profile/manifests/wmcs/services/postgres/common.pp', line 2

class profile::wmcs::services::postgres::common (
    Stdlib::Unixpath $root_dir = lookup('profile::wmcs::services::postgres::root_dir', {default_value => '/srv/postgres'}),
){
    $pgversion = $::lsbdistcodename ? {
        'buster' => 11,
        'stretch' => 9.6,
    }

    file { "/etc/postgresql/${pgversion}/main/tuning.conf":
        ensure => 'present',
        owner  => 'root',
        group  => 'root',
        mode   => '0444',
        source => 'puppet:///modules/profile/wmcs/db/postgres/tuning.conf',
    }

    sysctl::parameters { 'postgres_shmem':
        values => {
            # That is derived after tuning postgresql, deriving automatically is
            # not the safest idea yet.
            'kernel.shmmax' => 8388608000,
        },
    }
}