Forge Home

pgtune

Configures PostgreSQL instance for optimal usage of system resources.

11,132 downloads

7,249 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.4 (latest)
  • 0.1.3
  • 0.1.2
  • 0.1.1 (deleted)
  • 0.1.0
released Oct 10th 2016

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'Envek-pgtune', '0.1.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Envek-pgtune
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Envek-pgtune --version 0.1.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

Envek/pgtune — version 0.1.4 Oct 10th 2016

PgTune

Puppet
Forge Build Status Puppet Forge
Downloads

Puppet module for configuring PostgreSQL installations for optimal performance.

Heavily based on web version of PgTune utility by Alexey Vasiliev aka @le0pard. Note: not all functionality is implemented yet.

Please note that such autoconfiguration is not absolutely optimal in every case and should be considered as "quick start" solution. Most probably at some point of time you will stop use this module and will pick postgresql::server::config_entry definitions from its init.pp with values optimal for you.

Installation

Using librarian-puppet (recommended)

Place in your Puppetfile

mod 'Envek-pgtune'

And execute

librarian-puppet install

Just to install

Type on your Puppet master command:

puppet module install Envek-pgtune

Usage

To configure by default:

include pgtune

To limit memory for PostgreSQL by a half of installed RAM:

class { "pgtune":
    available_memory_mb => $memorysize_mb / 2,
}

To specify database purpose and desired connection limit:

class { 'pgtune':
    max_connections => 150,
    db_type         => 'web',
}

Available DB types

  • web - Web applications
  • oltp - Online transaction processing systems
  • dw - Data warehouses
  • desktop - Desktop applications
  • mixed - Mixed type of applications (this is default)

Found a mistake? Have a question?

Search for an (or open new) issue here: https://github.com/Envek/puppet-pgtune/issues or send a pull request!

Contributing

  1. Fork it (https://github.com/Envek/puppet-pgtune/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes
  4. Write tests for them, make sure that rake test passes
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create a new Pull Request