Puppet Class: pgpool::config::replication

Defined in:
manifests/config/replication.pp

Overview

Class: pgpool::config::replication

This class configures pgpool’s replication funcationality in pgpool.conf.

Parameters

replication_mode

String. Enabling this turns on replicaiton mode. Defaults to off.

replicate_select

String. Should selects also be replicated. Defaults to off.

insert_lock

String. www.pgpool.net/docs/latest/pgpool-en.html#INSERT_LOCK Defaults to off.

lobj_lock_table

String. The table name used for large object replication control. Defaults to ''.

replication_stop_on_mismatch

String. When enabled, if all backends don’t return the same packet kind, the backends that differe from most frequent reult set are degenerated. Defaults to off.

failover_if_affected_tuple_mismatch

String. When enabled, if backends don’t return the same number of affected tuples during an INSER/UPDATE/DELETE, the backends that differ are degerated. Defaults to off.

Variables

N/A

Examples

N/A

Authors

Alex Schultz <aschultz@next-development.com>

Parameters:

  • replication_mode (Any) (defaults to: 'off')
  • replicate_select (Any) (defaults to: 'off')
  • insert_lock (Any) (defaults to: 'off')
  • lobj_lock_table (Any) (defaults to: '')
  • replication_stop_on_mismatch (Any) (defaults to: 'off')
  • failover_if_affected_tuple_mismatch (Any) (defaults to: 'off')


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'manifests/config/replication.pp', line 46

class pgpool::config::replication (
  $replication_mode                    = 'off',
  $replicate_select                    = 'off',
  $insert_lock                         = 'off',
  $lobj_lock_table                     = '',
  $replication_stop_on_mismatch        = 'off',
  $failover_if_affected_tuple_mismatch = 'off',
) {

  $replication_config = {
    'replication_mode'                    => { value => $replication_mode },
    'replicate_select'                    => { value => $replicate_select },
    'insert_lock'                         => { value => $insert_lock },
    'lobj_lock_table'                     => { value => $lobj_lock_table },
    'replication_stop_on_mismatch'        => { value => $replication_stop_on_mismatch },
    'failover_if_affected_tuple_mismatch' => { value => $failover_if_affected_tuple_mismatch },
  }

  $replication_defaults = {
    ensure => present
  }

  create_resources(pgpool::config::val, $replication_config, $replication_defaults)
}