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.
Using librarian-puppet (recommended)
Place in your Puppetfile
mod 'Envek-pgtune'
And execute
librarian-puppet install
Type on your Puppet master command:
puppet module install Envek-pgtune
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',
}
web
- Web applicationsoltp
- Online transaction processing systemsdw
- Data warehousesdesktop
- Desktop applicationsmixed
- Mixed type of applications (this is default)
Search for an (or open new) issue here: https://github.com/Envek/puppet-pgtune/issues or send a pull request!
- Fork it (https://github.com/Envek/puppet-pgtune/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Make your changes
- Write tests for them, make sure that
rake test
passes - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request