Skip to content

Latest commit

 

History

History
246 lines (241 loc) · 7.16 KB

README.md

File metadata and controls

246 lines (241 loc) · 7.16 KB

pgpool Cookbook

Installs and configures PGPool

Attributes

pgpool::default

Key Type Description Default
['pgpool']['pgconf']['listen_address'] String listen address localhost
['pgpool']['pgconf']['port'] String bind port 9999
['pgpool']['pgconf']['logdir'] String log directory /var/log/pgpool
['pgpool']['pgconf']['enable_pool_hba'] Bool Pool HBA setting False
['pgpool']['pgconf']['backend_hostname0'] String Backend master Postgres instance to connect to Empty
['pgpool']['pgconf']['backend_hostname1'] String Hostname of Postgres slave instance Empty
['pgpool']['pgconf']['ssl'] Bool Enable connections over SSL/TLS False
['pgpool']['pgconf']['child_max_connections'] String Maximum number of connections that can be established for a given Pgpool instance. 0 (no limit)
['pgpool']0'pgconf']['client_idle_limit'] String Amount of time that a client can remain connected without issuing queries 0 (no limit)
['pgpool']['pgconf']['log_connections'] Bool Whether to log connecting clients False
['pgpool']['pgconf']['log_hostname'] Bool Whether to log the hostnames of connecting clients False
['pgpool']['pgconf']['debug_level'] String Specifies the debug level at which we should be logging 0 (no debug info)
['pgpool']['pgconf']['master_slave_mode'] Bool Enables or disables master-slave mode False (change to true if streaming replication is desired)
['pgpool']['pgconf']['sr_check_user'] String User that should be checking replication status on the backend nodes pgpool
['pgpool']['pgconf']['sr_check_password'] String Password for the replication check user pgpool
['pgpool']['pgconf']['failover_command'] String Command should be executed to promote a slave, usually something like pgctl promote Empty
['pgpool']['pgconf']['failback_command'] String Command to demote a master back to a slave Empty
['pgpool']['pgconf']['recovery_user'] String Specifies the online recovery user, only applicable in this mode Empty
['pgpool']['pgconf']['recovery_password'] String Recovery password, only applicable in online recovery mode and if a recovery user is set Empty
['pgpool']['pgconf']['recovery_first_stage_command'] String First stage recovery command, only applicable when using online recovery mode Empty
['pgpool']['pgconf']['recovery_second_stage_command'] String Second stage recovery command, only applicable when using online recovery mode Empty
['pgpool']['pgconf']['use_watchdog'] Bool Whether to use the watchdog module False
['pgpool']['pgconf']['trusted_servers'] String Servers that the watchdog should ping to determine whether network connectivity is ok, only applies if watchdog is enabled above Empty
['pgpool']['pgconf']['wd_hostname'] String Hostname from which watchdog queries should originate, should be set to the FQDN of the Pgpool instance Empty
['pgpool']['pgconf']['wd_authkey'] String Symmetric authentication token that should be present on all Pgpool instances communicating with each other, applicable if watchdog is enabled Empty (can generate with something like $ openssl dgst -sha256
['pgpool']['pgconf']['delegate_IP'] String IP address that an active Pgpool master should claim, only applies if configuring Pgpool in an HA fashion Empty
['pgpool']['pgconf']['if_up_cmd'] String Command to bring up the virtual IP if configuring Pgpool for HA Empty
['pgpool']['pgconf']['if_down_cmd'] String Command to bring down the interface and subsequent virtual IP, only applicable for HA configurations Empty
['pgpool']['pgconf']['heartbeat_destination0'] String Destination of a secondary Pgpool instance to which heartbeats should be sent Empty
['pgpool']['pgconf']['heartbeat_device0'] String Specifies the network interface that should be used to send heartbeats Empty
['pgpool']['pgconf']['wd_lifecheck_user'] String User that watchdog should use for running health checking queries, only applicable if query mode is used vs heartbeat Empty
['pgpool']['pgconf']['wd_lifecheck_password'] String Password for the wd_lifecheck_user, only applicable if using watchdog in query mode Empty
['pgpool']['pgconf']['other_pgpool_hostname0'] String Hostname of another Pgpool instance (applies if configuring HA Pgpool) Empty
There are miscellaneous settings that are also present in the list of default attributes, for the most current set of these consult attributes/default.rb. However, they are not required to get a Pgpool instance up and running in a given mode, so they are not explicitly documented here. Failing that, consult the Pgpool user manual.

Usage

pgpool::default

Just include pgpool in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[pgpool]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors