Puppet Class: pgpool::config::pools

Defined in:
manifests/config/pools.pp

Overview

Class: pgpool::config::pools

This class configures the pool related items for pgpool in the pgpool.conf

Parameters

num_init_children

Intger. The number of preforked pgpool-II server processes. Defaults to 32.

max_pool

Integer. The max number of cached connections in the pgpool-II children processes. Defaults to 4.

child_life_time

Integer. The cached connections expiration time in seconds. Defaults to 300.

child_max_connections

Integer. The pgpool child process will be terminated after this many connections. Defaults to 0.

connection_life_time

Integer. Cached connections expiration time in se4conds. Defaults to 0.

connection_cache

String. Activate connection pools Defaults to on.

reset_query_list

String. The SQL commands to be sent to reset the connection on the backend when exiting a session. Defaults to ABORT; DISCARD ALL.

client_idle_limit

Integer. The time to disconnect an idle connectionf or. Defaults to 0.

enable_pool_hba

String. Use the pool_hba.conf for client authentication. Defaults to off.

pool_passwd

String. The file name of the pool_passwd for md5 auth. Defaults to pool_passwd.

authentication_timeout

Integer. The timeout for pgpool authentication. Defaults to 60.

Variables

N/A

Examples

N/A

Authors

Alex Schultz <aschultz@next-development.com>

Parameters:

  • num_init_children (Any) (defaults to: 32)
  • max_pool (Any) (defaults to: 4)
  • child_life_time (Any) (defaults to: 300)
  • child_max_connections (Any) (defaults to: 0)
  • connection_life_time (Any) (defaults to: 0)
  • connection_cache (Any) (defaults to: 'on')
  • reset_query_list (Any) (defaults to: 'ABORT; DISCARD ALL')
  • client_idle_limit (Any) (defaults to: 0)
  • enable_pool_hba (Any) (defaults to: 'off')
  • pool_passwd (Any) (defaults to: 'pool_passwd')
  • authentication_timeout (Any) (defaults to: 60)


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'manifests/config/pools.pp', line 65

class pgpool::config::pools (
  $num_init_children      = 32,
  $max_pool               = 4,
  $child_life_time        = 300,
  $child_max_connections  = 0,
  $connection_life_time   = 0,
  $connection_cache       = 'on',
  $reset_query_list       = 'ABORT; DISCARD ALL',
  $client_idle_limit      = 0,
  $enable_pool_hba        = 'off',
  $pool_passwd            = 'pool_passwd',
  $authentication_timeout = 60,
) {

  $pools_config = {
    'num_init_children'      => { value => $num_init_children },
    'max_pool'               => { value => $max_pool },
    'child_life_time'        => { value => $child_life_time },
    'child_max_connections'  => { value => $child_max_connections },
    'connection_life_time'   => { value => $connection_life_time },
    'connection_cache'       => { value => $connection_cache },
    'reset_query_list'       => { value => $reset_query_list },
    'client_idle_limit'      => { value => $client_idle_limit },
    'enable_pool_hba'        => { value => $enable_pool_hba },
    'pool_passwd'            => { value => $pool_passwd },
    'authentication_timeout' => { value => $authentication_timeout },
  }

  $pools_defaults = {
    ensure => present
  }

  create_resources(pgpool::config::val, $pools_config, $pools_defaults)
}