Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

postgresql (119) Versions 11.1.3

Installs and configures postgresql for clients or servers

Policyfile
Berkshelf
Knife
cookbook 'postgresql', '= 11.1.3', :supermarket
cookbook 'postgresql', '= 11.1.3'
knife supermarket install postgresql
knife supermarket download postgresql
README
Dependencies
Changelog
Quality 33%

PostgreSQL cookbook

Cookbook Version
Build Status
OpenCollective
OpenCollective
License

Installs and configures PostgreSQL as a client or a server.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Upgrading

If you are wondering where all the recipes went in v7.0+, or how on earth I use this new cookbook please see UPGRADING.md for a full description.

Requirements

Platforms

  • Amazon Linux
  • Debian 9+
  • Ubuntu 18.04+
  • Red Hat/CentOS/Scientific 7+

PostgreSQL version

We follow the currently supported versions listed on https://www.postgresql.org/support/versioning/

Chef

  • Chef 16

Cookbook Dependencies

  • yum >= 7.2.0 (for dnf_module resource)

Resources

  • [postgresql_access](documentation/postgresql_access.md)
  • [postgresql_config](documentation/postgresql_config.md)
  • [postgresql_database](documentation/postgresql_database.md)
  • [postgresql_extension](documentation/postgresql_extension.md)
  • [postgresql_ident](documentation/postgresql_ident.md)
  • [postgresql_install](documentation/postgresql_install.md)
  • [postgresql_role](documentation/postgresql_role.md)
  • [postgresql_service](documentation/postgresql_service.md)

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website
https://opencollective.com/sous-chefs/sponsor/1/website
https://opencollective.com/sous-chefs/sponsor/2/website
https://opencollective.com/sous-chefs/sponsor/3/website
https://opencollective.com/sous-chefs/sponsor/4/website
https://opencollective.com/sous-chefs/sponsor/5/website
https://opencollective.com/sous-chefs/sponsor/6/website
https://opencollective.com/sous-chefs/sponsor/7/website
https://opencollective.com/sous-chefs/sponsor/8/website
https://opencollective.com/sous-chefs/sponsor/9/website

Dependent cookbooks

yum >= 7.2.0

Contingent cookbooks

akibanserver Applicable Versions
alfresco Applicable Versions
askbot Applicable Versions
bacula-server Applicable Versions
bamboo Applicable Versions
chef-bareos Applicable Versions
chef-manageiq Applicable Versions
chef_crowd Applicable Versions
chef_jira Applicable Versions
cloudfoundry-cloud_controller Applicable Versions
cloudless-box Applicable Versions
confluence Applicable Versions
crowd Applicable Versions
database Applicable Versions
database_application Applicable Versions
databox Applicable Versions
django_platform Applicable Versions
dvwa Applicable Versions
etherpad-lite Applicable Versions
eulipion-cleanspeak Applicable Versions
fanfare Applicable Versions
flyway-cli Applicable Versions
foreman Applicable Versions
github_connector Applicable Versions
gitlab Applicable Versions
gitlabhq Applicable Versions
gitrob Applicable Versions
gotcms Applicable Versions
ignite-openfire Applicable Versions
jenkins_build Applicable Versions
jira Applicable Versions
lemur Applicable Versions
liquid-feedback Applicable Versions
mediacore Applicable Versions
metarepo Applicable Versions
mirage Applicable Versions
multicorn Applicable Versions
mx Applicable Versions
noosfero Applicable Versions
oc-id Applicable Versions
openerp Applicable Versions
openfire Applicable Versions
opennms Applicable Versions
openresty Applicable Versions
openstack-mistral Applicable Versions
openstack-ops-database Applicable Versions
owncloud Applicable Versions
paramount Applicable Versions
pentester Applicable Versions
pg-multi Applicable Versions
pg_monz Applicable Versions
pg_repack Applicable Versions
postfixadmin Applicable Versions
postgis Applicable Versions
postgres-hardening Applicable Versions
postgresql-cluster Applicable Versions
pvpgn Applicable Versions
rackmonkey Applicable Versions
railsbox Applicable Versions
razor Applicable Versions
redmine2 Applicable Versions
repmgr Applicable Versions
rubycas Applicable Versions
sphinx Applicable Versions
stackstorm Applicable Versions
stash Applicable Versions
supermarket Applicable Versions
webapp Applicable Versions
zabbix Applicable Versions
zabbix-pkg Applicable Versions
zabbix_lwrp Applicable Versions

postgresql Cookbook CHANGELOG

This file is used to list changes made in the last 3 major versions of the postgresql cookbook.

11.1.3 - 2023-02-01

  • Fix regex not matching databases names containing dashes and underscores
  • Update formatting output of pg_hba to support longer values

11.1.2 - 2023-01-12

  • Fix regex not matching usernames containing characters other than word characters

11.1.1 - 2022-12-22

11.1.0 - 2022-12-20

  • resolved cookstyle error: resources/role.rb:1:1 refactor: Chef/Deprecations/ResourceWithoutUnifiedTrue
  • Fix connection to server via local socket
  • Fix parsing of address field in pga_hba.conf

11.0.1 - 2022-12-13

Standardise files with files in sous-chefs/repo-management

11.0.0 - 2022-12-13

  • Major refactor, see [UPGRADING.md](UPGRADING.md)
  • Condense repository, client_install and server_install into common install resource with actions replacing the previous split resources.
    • :repository action
    • :install action
    • :client_install action
    • :server_install action
  • Refactor database, role (user) and extension resources to use pg gem for database access
    • All load_current_value support
  • Rename user resource to role to match PostgreSQL (still aliased to :postgresql_user)
  • Update various resource properties to match PostgreSQL side

10.0.2 - 2022-12-04

Standardise files with files in sous-chefs/repo-management

Standardise files with files in sous-chefs/repo-management

10.0.1 - 2022-02-04

  • Remove delivery and move to calling RSpec directly via a reusable workflow
  • Update tested platforms

10.0.0 - 2021-10-19

  • Move connection options to a resource partial
  • Require Chef 16+ for resource partials

9.1.0 - 2021-10-07

  • Use dnf_module resource from yum cookbook instead of manually shelling out
    • requires new dependency on yum >= 7.2.0
  • Remove unneeded apt & yum-epel dependencies
  • Move resource documentation out of README

9.0.3 - 2021-08-30

  • Standardise files with files in sous-chefs/repo-management
  • resolved cookstyle error: spec/libraries/helpers_spec.rb:84:31 convention: Layout/ClosingParenthesisIndentation

9.0.2 - 2021-06-01

  • Standardise files with files in sous-chefs/repo-management

9.0.1 - 2021-05-13

  • Prevent leaking the users password during account creation

9.0.0 - 2021-05-13

  • Use unified_mode for Chef 17 support
  • Update minimum Chef version top 15.3 where unified mode was introduced
  • Drop testing PostgreSQL 9.5 support now it's EOL
  • Add PostgreSQL 13 testing

8.3.0 - 2021-03-24

  • Fix idempotency when installing multiple client versions

8.2.1 - 2021-02-08

  • Fix changelog formatting

8.2.0 - 2021-02-04

  • Makes psqlrc optional when invoking psql_command_string

8.1.1 - 2021-01-12

  • Fix attribute updates for users with dashes

8.1.0 - 2020-12-09

  • Fix potential password exposure in logs

8.0.2 - 2020-11-20

  • Fix quoting of DROP ROLE query

v8.0.1 (2020-11-12)

  • Use system default locale when creating databases
  • resolved cookstyle error: spec/libraries/helpers_spec.rb:2:18 convention: Style/RedundantFileExtensionInRequire

v8.0.0 (2020-08-26)

  • Bumped default version of postgresql to 12
  • Added support for dnf by disabling the postgresql module on repo configuration
  • Add support for the pgdg-common repository
  • Add provides to resources
  • Add tests for currently supported postgresql releases
  • remove need to surround extension names with "" if they contain a '-'
  • resolved cookstyle error: libraries/helpers.rb:43:7 convention: Style/RedundantAssignment
  • resolved cookstyle error: libraries/helpers.rb:46:1 convention: Layout/EmptyLinesAroundMethodBody
  • resolved cookstyle error: libraries/helpers.rb:46:1 convention: Layout/TrailingWhitespace

v7.1.9 (2020-05-14)

  • resolved cookstyle error: resources/access.rb:30:28 convention: Layout/TrailingWhitespace
  • resolved cookstyle error: resources/access.rb:30:29 refactor: ChefModernize/FoodcriticComments
  • resolved cookstyle error: resources/access.rb:54:44 convention: Layout/TrailingWhitespace
  • resolved cookstyle error: resources/access.rb:54:45 refactor: ChefModernize/FoodcriticComments
  • resolved cookstyle error: resources/ident.rb:50:44 convention: Layout/TrailingWhitespace
  • resolved cookstyle error: resources/ident.rb:50:45 refactor: ChefModernize/FoodcriticComments
  • resolved cookstyle error: resources/repository.rb:35:59 convention: Layout/TrailingWhitespace
  • resolved cookstyle error: resources/repository.rb:35:60 refactor: ChefModernize/FoodcriticComments
  • resolved cookstyle error: resources/user.rb:39:66 convention: Layout/TrailingWhitespace
  • resolved cookstyle error: resources/user.rb:39:67 refactor: ChefModernize/FoodcriticComments

v7.1.8 (2020-02-22)

  • Fix incorrect ubuntu platform family value in postgresql_server_install
  • Re-add unit tests that were skipped

v7.1.7 (2020-02-21)

  • Correctly configure postgres-common on Ubuntu hosts (fixes #596)

v7.1.6 (2020-02-20)

  • Remove unnecessary nil default in resource properties
  • Migrate to GitHub Actions for testing

v7.1.5 (2019-11-18)

  • Allow to install extensions with hyphens, ex: postgresql_extension '"uuid-ossp"'
  • Update Circle CI config to match sous-chefs defaults #617
  • Remove Fedora testing from CI, not an official supported OS by sous-chefs, PR welcome #617

v7.1.4 (2019-03-28)

  • Fix installation of extensions.

v7.1.3 (2019-01-15)

  • Added support for dash in database role name.

v7.1.2 (2019-06-01)

  • Cleanup and update the user resource documentation and code. Removed extraneous 'sensitive' property which is a common property in all Chef resources.
  • Change default permissions on the postgres.conf to be world readable so that psql can work.

v7.1.1 (2018-09-26)

  • Rename slave to follower
  • Use CircleCI for testing
  • Simplyfy extension resource

v7.1.0 (2018-06-22)

  • Update the initdb script to use initdb rather than a service. #542
  • Refactor database commands to use the common connect method. #535
  • Increase the unit test coverage.

v7.0.0 (2018-05-25)

Breaking Change Please see UPGRADING.md and the README.md for information how to use.

  • Add custom resources for:

    • postgresql_client_install
    • postgresql_server_install
    • postgresql_repository
    • postgresql_pg_gem
  • Deprecate recipes:

    • apt_pgdg_postgresql
    • config_initdb
    • config_pgtune
    • contrib
    • ruby
    • yum_pgdg_postgresql
  • Remove deprecated tests

v6.1.3 (2018-04-18)

  • Fix recipes referencing the old helpers

v6.1.2 (2018-04-16)

this will be the last release of the 6.0 series before all recipes are removed from the cookbook

  • Deprecate all recipes

v6.1.1 (2017-03-08)

  • Fix pg gem installation on non-omnibus chef runs
  • Resolve resource cloning deprecation warnings in the ruby recipe
  • Fix issues resolving the timezone on CentOS 7 and probably other distros
  • Test with Delivery local instead of Rake

v6.1.0 (2017-02-18)

  • Fix a method name conflict that caused errors if Chef Sugar was also being used on the run list
  • Revert a previous PR that added support for Postgresql 9.6 as it introduced incorrect configuration values
  • Added Fedora 25 support for pgdg packages
  • Added RHEL 5 support for Postgresql 9.4 pgdg packages
  • Removed testing for RHEL 5 and Ubuntu 12.04 as they are scheduled for EoL in the near future
  • Improvements to Test Kitchen testing to allow more extensive testing in Travis CI
  • Fixed the client recipe on Fedora
  • Added Inspec tests for client installs

v6.0.1 (2017-01-04

  • Fix systemd unit file template

v6.0.0 (2017-01-03)

  • This cookbook now requires Chef 12.1 or later
  • Removed the dependency on the apt cookbook as this functionality is built into modern chef client releases
  • Added a new custom resource for installing extensions. This acts as a replacement for the contrib recipe with minimal backwards compatibility. You can now install / remove extensions into any database. This adds the compat_resource cookbook dependency so we can continue to support Chef 12.1-12.4, which lack custom resource support.
  • The unused get_result_orig helper has been removed. If you utilized this you'll want to move it to your own wrapper cookbook
  • Updates for compatibility with Postgresql 9.5 and 9.6
  • Fixed client package installation on openSUSE Leap 42.2
  • ca-certificates recipe has been deprecated. If ca-certificates package needs to be upgraded the user should do so prior to including this recipe. Package upgrades in community cookbooks are generally a bad idea as this bring in updated packages to production systems. The recipe currently warns if used and will be removed with the next major cookbook release.
  • Fixed RHEL platform detection in the Ruby recipe
  • systemd fixes for RHEL systems
  • Fix systemd service file include when using pgdg packages
  • Package installation now uses multi-package installs to speed up converge times
  • Added integration testing in Travis of the client recipe using a new test cookbook. This will be expanded in the future to cover server installation as well
  • Expanded the specs to test converges on multiple platforms

v5.2.0 (2016-12-30)

  • Updated contacts and links to point to Sous Chefs now
  • Added a Code of Conduct (the Chef CoC)
  • Removed duplicate platforms in the metadata
  • Fix Chef runs with local mode in the server recipe
  • Fix the ruby recipe to not fail when you specify enabling both the apt and yum repos for mixed distro environments
  • Set the postgresql data directory to 700 permissions
  • Added node['postgresql']['pg_gem']['version'] to specify the version of the pg gem to install
  • Cookstyle fixes for the latest cookstyle release
  • Removed test deps from the Gemfile. Rely on ChefDK for base testing deps instead

v5.1.0 (2016-11-01)

  • Maintenance of this cookbook has been migrated from Heavy Water to Sous Chefs - https://sous-chefs.org/
  • Add support for Chef-Zero (local mode)
  • Don't hardcode the UID / GID on RHEL/Amazon/Suse platforms
  • Add PGDG yum RPMs for 9.5 / 9.6

v5.0.0 (2016-10-25)

Breaking changes

  • Switched from Librarian to Berkshelf
  • Remove support for the following platforms

    • SLES < 12
    • openSUSE < 13
    • Debian < 7
    • Ubuntu < 12.04
    • RHEL < 6
    • Amazon < 2013
    • Unsupported (EOL) Fedora releases

Other changes

  • Added support for Ubuntu 16.04
  • Loosened cookbook dependencies to not prevent pulling in the latest community cookbooks
  • Added chef_version metadata
  • Switched from rubocop to cookstyle and fix all warnings
  • Removed minitests and the minitest handler
  • Added support for opensuse / opensuseleap
  • Added support for Fedora 23/24
  • Added a chefignore file to limit the files uploaded to the chef server
  • Updated Test Kitchen config to test on modern platform releases
  • Added a Rakefile and updated Travis to test with ChefDK and that rakefile
  • Avoid installing packages included in build-essential twice in the ruby recipe
  • Require at least build-essential 2.0
  • Don't cleanup the old PPA files in the apt_pgdg_postgresql recipe anymore. These should be long gone everywhere
  • Remove logic in the apt_pgdg_postgresql recipe that made Chef fail when new distro releases came out
  • Avoid node.set deprecation warnings
  • Avoid managed_home deprecation warnings in server_redhat recipe

Collaborator Number Metric
            

11.1.3 passed this metric

Contributing File Metric
            

11.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

11.1.3 failed this metric

Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): postgresql/resources/access.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): postgresql/resources/config.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): postgresql/resources/database.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): postgresql/resources/extension.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): postgresql/resources/ident.rb: 1

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

11.1.3 passed this metric

Testing File Metric
            

11.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

11.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number