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

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

Overview

Parameters:

  • root_dir (Any) (defaults to: hiera('profile::wmcs::services::postgres::root_dir', '/srv/postgres'))


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

class profile::wmcs::services::postgres::common (
    $root_dir = hiera('profile::wmcs::services::postgres::root_dir', '/srv/postgres'),
){
    $pgversion = $::lsbdistcodename ? {
        'stretch' => '9.6',
        'jessie'  => '9.4',
    }

    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,
        },
    }
}